Skip to content

Commit

Permalink
Fix pylint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
konskov committed Oct 2, 2023
1 parent f505bd2 commit c1b500f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code_style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
# sporadically when a new version becomes available.
pip install black prospector==1.8.4 pylint==2.16.0 dodgy==0.2.1 \
mccabe==0.7.0 pycodestyle==2.9.1 pyflakes==2.5.0 \
psutil pygithub
psutil pygithub pglast
pip list
pip list --user
- name: Checkout source
Expand Down
10 changes: 6 additions & 4 deletions scripts/check_updates_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self):
super().__init__()

# ALTER TABLE _timescaledb_catalog.<tablename> ADD/DROP COLUMN
def visit_AlterTableStmt(self, ancestors, node):
def visit_AlterTableStmt(self, ancestors, node): # pylint: disable=unused-argument
if (
"schemaname" in node.relation
and node.relation.schemaname in self.catalog_schemata
Expand All @@ -41,7 +41,7 @@ def visit_AlterTableStmt(self, ancestors, node):
)

# ALTER TABLE _timescaledb_catalog.<tablename> RENAME TO
def visit_RenameStmt(self, ancestors, node):
def visit_RenameStmt(self, ancestors, node): # pylint: disable=unused-argument
if (
node.renameType == enums.ObjectType.OBJECT_TABLE
and node.relation.schemaname in self.catalog_schemata
Expand All @@ -52,7 +52,7 @@ def visit_RenameStmt(self, ancestors, node):
)

# CREATE TEMP | TEMPORARY TABLE ..
def visit_CreateStmt(self, ancestors, node):
def visit_CreateStmt(self, ancestors, node): # pylint: disable=unused-argument
if node.relation.relpersistence == "t":
self.errors += 1
schema = (
Expand All @@ -65,7 +65,9 @@ def visit_CreateStmt(self, ancestors, node):
)

# CREATE FUNCTION / PROCEDURE _timescaledb_internal...
def visit_CreateFunctionStmt(self, ancestors, node):
def visit_CreateFunctionStmt(
self, ancestors, node
): # pylint: disable=unused-argument
if len(node.funcname) == 2 and node.funcname[0].sval == "_timescaledb_internal":
self.errors += 1
functype = "procedure" if node.is_procedure else "function"
Expand Down

0 comments on commit c1b500f

Please sign in to comment.