Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce max-length of flake8 #3201

Merged
merged 4 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# W504: line break after binary operator
# (Raised by flake8 even when it is followed)
ignore = E126, E402, E129, W504
max-line-length = 148
max-line-length = 147
exclude = test_import_fail.py,
parsl/executors/workqueue/parsl_coprocess.py
# E741 disallows ambiguous single letter names which look like numbers
Expand Down
2 changes: 1 addition & 1 deletion parsl/addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def address_by_hostname() -> str:
def address_by_interface(ifname: str) -> str:
"""Returns the IP address of the given interface name, e.g. 'eth0'

This is taken from a Stack Overflow answer: https://stackoverflow.com/questions/24196932/how-can-i-get-the-ip-address-of-eth0-in-python#24196955
This is from a Stack Overflow answer: https://stackoverflow.com/questions/24196932/how-can-i-get-the-ip-address-of-eth0-in-python#24196955

Parameters
----------
Expand Down
6 changes: 3 additions & 3 deletions parsl/dataflow/dflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,9 @@ def launch_task(self, task_record: TaskRecord) -> Future:

if hasattr(exec_fu, "parsl_executor_task_id"):
logger.info(
f"Parsl task {task_id} try {try_id} launched on executor {executor.label} "
f"with executor id {exec_fu.parsl_executor_task_id}"
)
f"Parsl task {task_id} try {try_id} launched on executor {executor.label} "
f"with executor id {exec_fu.parsl_executor_task_id}")

else:
logger.info(f"Parsl task {task_id} try {try_id} launched on executor {executor.label}")

Expand Down
3 changes: 1 addition & 2 deletions parsl/executors/taskvine/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ def __create_data_and_logging_dirs(self):
logger.debug(f"Function data directory: {self._function_data_dir}, log directory: {log_dir}")
logger.debug(
f"TaskVine manager log directory: {self.manager_config.vine_log_dir}, "
f"factory log directory: {self.factory_config.scratch_dir}"
)
f"factory log directory: {self.factory_config.scratch_dir}")

def start(self):
"""Create submit process and collector thread to create, send, and
Expand Down
8 changes: 7 additions & 1 deletion parsl/monitoring/db_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ def insert(self, *, table: str, messages: List[MonitoringMessage]) -> None:
def rollback(self) -> None:
self.session.rollback()

def _generate_mappings(self, table: Table, columns: Optional[List[str]] = None, messages: List[MonitoringMessage] = []) -> List[Dict[str, Any]]:
def _generate_mappings(
self,
table: Table,
columns: Optional[List[str]] = None,
messages: List[MonitoringMessage] = [],
) -> List[Dict[str, Any]]:

mappings = []
for msg in messages:
m = {}
Expand Down
8 changes: 3 additions & 5 deletions parsl/tests/configs/user_opts.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@
# 'username': MIDWAY_USERNAME,
# 'script_dir': '/scratch/midway2/{}/parsl_scripts'.format(MIDWAY_USERNAME),
# 'scheduler_options': "",
# 'worker_init': (
# 'cd /scratch/midway2/{}/parsl_scripts; '
# 'module load Anaconda3/5.1.0; '
# 'source activate parsl_testing;'
# ).format(MIDWAY_USERNAME),
# 'worker_init': 'cd /scratch/midway2/{}/parsl_scripts; '
# 'module load Anaconda3/5.1.0; source activate parsl_testing;'
# .format(MIDWAY_USERNAME),
# },
# 'osg': {
# 'username': OSG_USERNAME,
Expand Down
Loading