Skip to content

Commit

Permalink
lint: ignore flake8 line too long for ignored types
Browse files Browse the repository at this point in the history
Adding a `# type: ignore` comment to a couple of places triggered
flake8's line too long check.

Running `make reformat` did nothing for these - black has outstanding
design issues with line length and comments.

See psf/black#1713 for one example.

Instead of changing the line structure to accommodate, ignore these two
cases, at least until the types can be fixed and the comments removed.

Signed-off-by: Mike Fiedler <[email protected]>
  • Loading branch information
miketheman committed Mar 7, 2022
1 parent 2aaeb9a commit c049ee4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion warehouse/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ def warehouse(ctx):

# We want to automatically import all of the warehouse.cli.* modules so that
# any commands registered in any of them will be discovered.
for _, name, _ in pkgutil.walk_packages(__path__, prefix=__name__ + "."): # type: ignore
for _, name, _ in pkgutil.walk_packages(__path__, prefix=__name__ + "."): # type: ignore # noqa
importlib.import_module(name)
2 changes: 1 addition & 1 deletion warehouse/packaging/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class Project(SitemapMixin, TwoFactorRequireable, db.Model):

total_size = Column(BigInteger, server_default=sql.text("0"))

users = orm.relationship(User, secondary=Role.__table__, backref="projects") # type: ignore
users = orm.relationship(User, secondary=Role.__table__, backref="projects") # type: ignore # noqa

releases = orm.relationship(
"Release",
Expand Down

0 comments on commit c049ee4

Please sign in to comment.