Skip to content

Commit 4e17259

Browse files
chore: addressed lint issue with __version__ (#534)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-bigquery-sqlalchemy/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) Fixes #533 🦕
1 parent 1ffab57 commit 4e17259

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

sqlalchemy_bigquery/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
SQLAlchemy dialect for Google BigQuery
2121
"""
2222

23-
from .version import __version__ # noqa
23+
from .version import __version__
2424

25-
from .base import BigQueryDialect, dialect # noqa
25+
from .base import BigQueryDialect, dialect
2626
from ._types import (
2727
ARRAY,
2828
BIGNUMERIC,
@@ -44,6 +44,8 @@
4444
)
4545

4646
__all__ = [
47+
"__version__",
48+
"dialect",
4749
"ARRAY",
4850
"BIGNUMERIC",
4951
"BigQueryDialect",

tests/unit/test_version.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) 2022 The sqlalchemy-bigquery Authors
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
# this software and associated documentation files (the "Software"), to deal in
5+
# the Software without restriction, including without limitation the rights to
6+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7+
# the Software, and to permit persons to whom the Software is furnished to do so,
8+
# subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19+
20+
import sqlalchemy_bigquery
21+
import sqlalchemy_bigquery.version
22+
23+
24+
def test_sqlalchemy_bigquery_has_version():
25+
assert isinstance(sqlalchemy_bigquery.__version__, str)
26+
27+
28+
def test_version_module_has_version():
29+
assert isinstance(sqlalchemy_bigquery.version.__version__, str)

0 commit comments

Comments
 (0)