Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/pre commit mirror #454

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ repos:
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 22.6.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black
args:
Expand Down
6 changes: 4 additions & 2 deletions src/snowflake/sqlalchemy/custom_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def field_delimiter(self, deli_type):

def file_extension(self, ext):
"""String that specifies the extension for files unloaded to a stage. Accepts any extension. The user is
responsible for specifying a valid file extension that can be read by the desired software or service."""
responsible for specifying a valid file extension that can be read by the desired software or service.
"""
if not isinstance(ext, (NoneType, string_types)):
raise TypeError("File extension should be a string")
self.options["FILE_EXTENSION"] = ext
Expand Down Expand Up @@ -386,7 +387,8 @@ def compression(self, comp_type):

def file_extension(self, ext):
"""String that specifies the extension for files unloaded to a stage. Accepts any extension. The user is
responsible for specifying a valid file extension that can be read by the desired software or service."""
responsible for specifying a valid file extension that can be read by the desired software or service.
"""
if not isinstance(ext, (NoneType, string_types)):
raise TypeError("File extension should be a string")
self.options["FILE_EXTENSION"] = ext
Expand Down
1 change: 0 additions & 1 deletion src/snowflake/sqlalchemy/snowdialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ def has_sequence(self, connection, sequence_name, schema=None):
return self._has_object(connection, "SEQUENCE", sequence_name, schema)

def _has_object(self, connection, object_type, object_name, schema=None):

full_name = self._denormalize_quote_join(schema, object_name)
try:
results = connection.execute(
Expand Down
2 changes: 0 additions & 2 deletions tests/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def test_no_indexes(engine_testaccount, db_parameters):


def test_timezone(db_parameters):

test_table_name = "".join([random.choice(string.ascii_letters) for _ in range(5)])

sa_engine = create_engine(
Expand Down Expand Up @@ -236,7 +235,6 @@ def test_timezone(db_parameters):
).raw_connection()

with sa_engine.connect() as conn:

with conn.begin():
conn.exec_driver_sql(
textwrap.dedent(
Expand Down
Loading