Skip to content

Commit

Permalink
Run mypy on examples
Browse files Browse the repository at this point in the history
  • Loading branch information
drhagen committed Nov 26, 2024
1 parent 5337334 commit bf33de8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# This covers a typical URL schema, not the crazy one specified by https://tools.ietf.org/html/rfc3986
# In particular, this doesn't handle Unicode

UserInfo = namedtuple("Userinfo", ["username", "password"])
UserInfo = namedtuple("UserInfo", ["username", "password"])
DomainName = namedtuple("DomainName", ["domains"])
Url = namedtuple("Uri", ["scheme", "user_info", "host", "port", "path", "query", "fragment"])
Url = namedtuple("Url", ["scheme", "user_info", "host", "port", "path", "query", "fragment"])


class TypicalUrlParsers(ParserContext):
Expand Down Expand Up @@ -43,7 +43,7 @@ class TypicalUrlParsers(ParserContext):
query_as_is = reg(r"[*-._A-Za-z0-9]+")
query_space = lit("+") > constant(" ")
query_string = rep1(query_as_is | query_space | encoded) > "".join
query = repsep(query_string << "=" & query_string, "&") > OrderedDict
query = repsep(query_string << "=" & query_string, "&") > OrderedDict # type: ignore

fragment = reg(r"[-._~/?A-Za-z0-9]*")

Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def lint(s: Session, command: list[str]):

@session(venv_backend="none")
def type_check(s: Session):
s.run("mypy", "src")
s.run("mypy", "src", "examples")


@session(venv_backend="none")
Expand Down

0 comments on commit bf33de8

Please sign in to comment.