style: Flake8によるリント不正の解消。フォーマット文字列は変数が埋め込まれていなくてもエラーにしないよう、チェックを無視するように修正した
This commit is contained in:
parent
24149be0b1
commit
e532b395df
@ -10,7 +10,7 @@
|
||||
"python.linting.enabled": true,
|
||||
"python.linting.pylintEnabled": false,
|
||||
"python.linting.flake8Enabled": true,
|
||||
"python.linting.flake8Args": ["--max-line-length=150"],
|
||||
"python.linting.flake8Args": ["--max-line-length=150", "--ignore=F541"],
|
||||
"python.formatting.provider": "autopep8",
|
||||
"python.formatting.autopep8Args": ["--max-line-length", "150"]
|
||||
}
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
from datetime import datetime
|
||||
|
||||
from src.constants import CONV_JP_NAME
|
||||
from src.converter.converter import CSVStringConverter
|
||||
from src.error.exceptions import DataConvertException
|
||||
|
||||
@ -81,7 +81,10 @@ def fetch_crm_data(target_object, last_fetch_datetime):
|
||||
return sf_object_jsons
|
||||
|
||||
|
||||
@retry(wait=wait_exponential(multiplier=CRM_GET_RECORD_COUNT_RETRY_INTERVAL, min=CRM_GET_RECORD_COUNT_RETRY_MIN_INTERVAL, max=CRM_GET_RECORD_COUNT_RETRY_MAX_INTERVAL), stop=stop_after_attempt(CRM_GET_RECORD_COUNT_MAX_RETRY_ATTEMPT))
|
||||
@retry(
|
||||
wait=wait_exponential(multiplier=CRM_GET_RECORD_COUNT_RETRY_INTERVAL,
|
||||
min=CRM_GET_RECORD_COUNT_RETRY_MIN_INTERVAL, max=CRM_GET_RECORD_COUNT_RETRY_MAX_INTERVAL),
|
||||
stop=stop_after_attempt(CRM_GET_RECORD_COUNT_MAX_RETRY_ATTEMPT))
|
||||
def fetch_sf_count_retry(object_name, last_update_datetime_from, last_update_datetime_to):
|
||||
try:
|
||||
global count_contime_counter, count_readtime_counter, count_counter
|
||||
@ -110,7 +113,10 @@ def fetch_sf_count_retry(object_name, last_update_datetime_from, last_update_dat
|
||||
raise e
|
||||
|
||||
|
||||
@retry(wait=wait_exponential(multiplier=CRM_FETCH_RECORD_RETRY_INTERVAL, min=CRM_FETCH_RECORD_RETRY_MIN_INTERVAL, max=CRM_FETCH_RECORD_RETRY_MAX_INTERVAL), stop=stop_after_attempt(CRM_FETCH_RECORD_MAX_RETRY_ATTEMPT))
|
||||
@retry(
|
||||
wait=wait_exponential(multiplier=CRM_FETCH_RECORD_RETRY_INTERVAL,
|
||||
min=CRM_FETCH_RECORD_RETRY_MIN_INTERVAL, max=CRM_FETCH_RECORD_RETRY_MAX_INTERVAL),
|
||||
stop=stop_after_attempt(CRM_FETCH_RECORD_MAX_RETRY_ATTEMPT))
|
||||
def fetch_sf_data_retry(columns, object_name, last_update_datetime_from, last_update_datetime_to):
|
||||
try:
|
||||
global data_contime_counter, data_readtime_counter, data_counter
|
||||
|
||||
@ -80,7 +80,7 @@ def main() -> None:
|
||||
# 9. CSV変換処理を呼び出す
|
||||
logger.info(
|
||||
f'I-CTRL-12 [{target_object.object_name}] CSV変換処理呼び出し')
|
||||
csv_object = convert_crm_csvdata(target_object, sf_object_jsons)
|
||||
csv_object = convert_crm_csvdata(target_object, sf_object_jsons)
|
||||
|
||||
# 10. CSVバックアップ処理を呼び出す
|
||||
logger.info(
|
||||
|
||||
@ -12,7 +12,7 @@ def updload_last_fetch_datetime(target_object, last_fetch_datetime):
|
||||
f'I-UPD-01 [{target_object.object_name}] の前回取得日時ファイルの更新処理を開始します')
|
||||
|
||||
try:
|
||||
if target_object.is_update_last_fetch_datetime == False:
|
||||
if target_object.is_update_last_fetch_datetime is False:
|
||||
# ② オブジェクト情報.is_update_last_fetch_datetimeがfalseの場合、以降の処理をスキップする
|
||||
logger.info(
|
||||
f'I-UPD-02 [{target_object.object_name}] の前回取得日時ファイルの更新処理をスキップします')
|
||||
@ -33,7 +33,9 @@ def updload_last_fetch_datetime(target_object, last_fetch_datetime):
|
||||
|
||||
except Exception as e:
|
||||
raise FileUploadException(
|
||||
'E-UPD-01', UPD_JP_NAME, f'[{target_object.object_name}] 前回処理日時ファイルのアップロードに失敗しました ファイル名:[{target_object.last_fetch_datetime_file_name}] エラー内容:[{e}]')
|
||||
'E-UPD-01',
|
||||
UPD_JP_NAME,
|
||||
f'[{target_object.object_name}] 前回処理日時ファイルのアップロードに失敗しました ファイル名:[{target_object.last_fetch_datetime_file_name}] エラー内容:[{e}]')
|
||||
|
||||
# ④ 前回取得日時ファイル更新処理の終了ログを出力する
|
||||
logger.info(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user