Skip to content

Commit

Permalink
Define global variable at the module level
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlecat committed Jul 14, 2017
1 parent ed41bf7 commit 1b7368b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion critiquebrainz/frontend/external/musicbrainz_db/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from typing import Optional
from contextlib import contextmanager
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.orm import sessionmaker, scoped_session, Session
from sqlalchemy.pool import NullPool

engine = None
Session: Optional[Session] = None

def init_db_engine(connect_str):
global engine, Session
Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=missing-docstring,protected-access,invalid-name,global-statement,fixme,too-many-locals,too-many-branches,redefined-builtin,broad-except,line-too-long,too-many-arguments,too-many-instance-attributes,redefined-outer-name,attribute-defined-outside-init,anomalous-backslash-in-string,too-many-statements,global-variable-undefined,too-few-public-methods,redefined-argument-from-local,too-many-return-statements,too-many-function-args,redefined-argument-from-local,too-many-public-methods
disable=missing-docstring,protected-access,invalid-name,global-statement,fixme,too-many-locals,too-many-branches,redefined-builtin,broad-except,line-too-long,too-many-arguments,too-many-instance-attributes,redefined-outer-name,attribute-defined-outside-init,anomalous-backslash-in-string,too-many-statements,too-few-public-methods,redefined-argument-from-local,too-many-return-statements,too-many-function-args,redefined-argument-from-local,too-many-public-methods


[REPORTS]
Expand Down

0 comments on commit 1b7368b

Please sign in to comment.