Skip to content

Commit

Permalink
Merge pull request #966 from opengisch/QF-4429-fix-mypy
Browse files Browse the repository at this point in the history
Fix typing for QuerySet
  • Loading branch information
suricactus authored Jun 20, 2024
2 parents 330348b + 3caa5b7 commit 89d4622
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ repos:

# Static type-checking with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.5.1'
rev: 'v1.10.0'
hooks:
- id: mypy
additional_dependencies: [types-pytz, types-Deprecated, types-PyYAML, types-requests, types-tabulate, types-jsonschema, django-stubs]
additional_dependencies: [types-pytz, types-Deprecated, types-PyYAML, types-requests, types-tabulate, types-jsonschema, django-stubs, django-stubs-ext]
pass_filenames: false
entry: bash -c 'mypy -p docker-qgis -p docker-app "$@"' --
entry: bash -c 'mypy -p docker-app -p docker-qgis "$@"' --
2 changes: 1 addition & 1 deletion docker-app/qfieldcloud/core/querysets_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def get_team_members(team):
return TeamMember.objects.filter(team=team)


def get_organization_members(organization) -> QuerySet[Person]:
def get_organization_members(organization) -> "QuerySet[Person]":
org_members = Person.objects.filter(
organizationmember__organization=organization
).annotate(role=F("organizationmember__role"))
Expand Down
2 changes: 1 addition & 1 deletion docker-app/qfieldcloud/core/utils2/pg_service_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def validate_pg_service_conf(value: str) -> None:
try:
buffer = io.StringIO(value)
config = configparser.ConfigParser()
config.readfp(buffer)
config.read_file(buffer)

if len(config.sections()) != 1:
raise ValidationError(
Expand Down

0 comments on commit 89d4622

Please sign in to comment.