style: Flake8によるリント不正の解消。フォーマット文字列は変数が埋め込まれていなくてもエラーにしないよう、チェックを無視するように修正した

This commit is contained in:
shimoda.m@nds-tyo.co.jp 2022-07-21 20:00:35 +09:00
parent 24149be0b1
commit e532b395df
5 changed files with 14 additions and 8 deletions

View File

@ -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"]
}

View File

@ -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

View File

@ -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

View File

@ -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(