mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-01 17:28:11 +08:00
Autoformat python to fix lint errors (#1470)
* Autoformat python to fix lint errors * Fix lint errors not caught by black
This commit is contained in:
+3
-3
@@ -156,7 +156,7 @@ try:
|
||||
|
||||
dataroot = os.getenv("CXG_DATAROOT")
|
||||
if dataroot:
|
||||
logging.info(f"Configuration from CXG_DATAROOT")
|
||||
logging.info("Configuration from CXG_DATAROOT")
|
||||
app_config.update(multi_dataset__dataroot=dataroot)
|
||||
|
||||
secret_name = os.getenv("CXG_AWS_SECRET_NAME")
|
||||
@@ -171,7 +171,7 @@ try:
|
||||
if not secret_region_name:
|
||||
secret_region_name = discover_s3_region_name(config_file)
|
||||
if not secret_region_name:
|
||||
logging.error(f"Could not determine the AWS Secret Manager region")
|
||||
logging.error("Could not determine the AWS Secret Manager region")
|
||||
sys.exit(1)
|
||||
|
||||
flask_secret_key = get_flask_secret_key(secret_region_name, secret_name)
|
||||
@@ -188,7 +188,7 @@ try:
|
||||
|
||||
if not app_config.server__flask_secret_key:
|
||||
logging.critical(
|
||||
f"flask_secret_key is not provided. Either set in config file, CXG_SECRET_KEY environment variable, "
|
||||
"flask_secret_key is not provided. Either set in config file, CXG_SECRET_KEY environment variable, "
|
||||
"or in AWS Secret Manager"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -29,16 +29,12 @@ def check(expected, custom):
|
||||
# cdict must only have exact requirements (==)
|
||||
for cname, cspecs in cdict.items():
|
||||
if len(cspecs) != 1 or cspecs[0][0] != "==":
|
||||
print(
|
||||
f"Error, spec must be an exact requirement {custom}: {cname} {str(cspecs)}"
|
||||
)
|
||||
print(f"Error, spec must be an exact requirement {custom}: {cname} {str(cspecs)}")
|
||||
okay = False
|
||||
|
||||
for ename, especs in edict.items():
|
||||
if ename not in cdict:
|
||||
print(
|
||||
f"Error, missing requirement from {custom}: {ename} {str(especs)}"
|
||||
)
|
||||
print(f"Error, missing requirement from {custom}: {ename} {str(especs)}")
|
||||
okay = False
|
||||
continue
|
||||
|
||||
@@ -46,9 +42,7 @@ def check(expected, custom):
|
||||
for espec in especs:
|
||||
rokay = check_version(cver, espec[0], Version(espec[1]))
|
||||
if not rokay:
|
||||
print(
|
||||
f"Error, failed requirement from {custom}: {ename} {espec}, {cver}"
|
||||
)
|
||||
print(f"Error, failed requirement from {custom}: {ename} {espec}, {cver}")
|
||||
okay = False
|
||||
|
||||
if okay:
|
||||
|
||||
Reference in New Issue
Block a user