Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Commit

Permalink
Run mypy without --no-strict-optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jpopelka committed Apr 5, 2022
1 parent 159f667 commit 92c0a3f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

repos:
- repo: https://github.com/psf/black
rev: 22.1.0
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
hooks:
- id: pyupgrade
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.0
rev: v2.6.2
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -38,10 +38,10 @@ repos:
- --max-line-length=100
- --per-file-ignores=files/packit.wsgi:F401,E402
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.941
rev: v0.942
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
args: [--ignore-missing-imports]
additional_dependencies: [types-pkg_resources]
- repo: https://github.com/packit/pre-commit-hooks
rev: 3bf9afc5ede12a4ee26e9451f306edf255749396
Expand Down
2 changes: 1 addition & 1 deletion hardly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
__version__ = None
__version__ = ""
16 changes: 8 additions & 8 deletions hardly/handlers/distgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ def __init__(
job_config=job_config,
event=event,
)
self.mr_identifier = event.get("identifier")
self.mr_title = event.get("title")
self.mr_description = event.get("description")
self.mr_url = event.get("url")
self.source_project_url = event.get("source_project_url")
self.mr_identifier = event["identifier"]
self.mr_title = event["title"]
self.mr_description = event["description"]
self.mr_url = event["url"]
self.source_project_url = event["source_project_url"]
self.target_repo = (
event.get("target_repo_namespace") + "/" + event.get("target_repo_name")
f"{event['target_repo_namespace']}/{event['target_repo_name']}"
)
self.target_repo_branch = event.get("target_repo_branch")
self.target_repo_branch = event["target_repo_branch"]

def run(self) -> TaskResults:
"""
Expand Down Expand Up @@ -84,7 +84,7 @@ def run(self) -> TaskResults:
dg_mr_info = f"""###### Info for package maintainer
This MR has been automatically created from
[this source-git MR]({self.mr_url})."""
if getenv("PROJECT") and getenv("PROJECT").startswith("stream"):
if getenv("PROJECT", "").startswith("stream"):
dg_mr_info += """
Please review the contribution and once you are comfortable with the content,
you should trigger a CI pipeline run via `Pipelines → Run pipeline`."""
Expand Down

0 comments on commit 92c0a3f

Please sign in to comment.