From c049ee4890e867170d475a814efaf5e9af9cb548 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Mon, 7 Mar 2022 08:09:25 -0500 Subject: [PATCH] lint: ignore flake8 line too long for ignored types 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 https://github.com/psf/black/issues/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 --- warehouse/cli/__init__.py | 2 +- warehouse/packaging/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/warehouse/cli/__init__.py b/warehouse/cli/__init__.py index 1b13996a2b2a..49aec8bf2db8 100644 --- a/warehouse/cli/__init__.py +++ b/warehouse/cli/__init__.py @@ -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) diff --git a/warehouse/packaging/models.py b/warehouse/packaging/models.py index f6cfa4052eab..f7f5e94fb417 100644 --- a/warehouse/packaging/models.py +++ b/warehouse/packaging/models.py @@ -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",