Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
force: true

- name: Check that docs can be built + Lint python docstrings with numpydoc (through Sphinx)
# Will FAIL if Sphinx throws any warnings/errors or if any numpydoc lint rule is violated
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Check for changed python files
id: changed-py-files
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v46
with:
base_sha: ${{ env.main_sha }}
files: '**/*.py'
Expand Down
2 changes: 1 addition & 1 deletion src/docplex_extensions/_dict_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def value_name(self, new: str | None) -> None:
def _get_repr_header(self) -> str:
# Header for repr.
if self.key_names is not None and self.value_name is not None:
return f"{self.__class__.__name__}: ({', '.join(self.key_names)}) -> {self.value_name}"
return f'{self.__class__.__name__}: ({", ".join(self.key_names)}) -> {self.value_name}'
else:
return f'{self.__class__.__name__}:'

Expand Down
5 changes: 2 additions & 3 deletions src/docplex_extensions/_index_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ def __delitem__(self, index: SupportsIndex | slice, /) -> None:
self._remove_elements(old_multiple)
case _:
raise TypeError(
'position indices must be integers or slices, not '
f'{type(index).__name__}'
f'position indices must be integers or slices, not {type(index).__name__}'
)
del self._list[index]
except IndexError:
Expand Down Expand Up @@ -952,7 +951,7 @@ def names(self, value: Sequence[str] | None) -> None:
def _get_repr_header(self) -> str:
# Header for repr.
if self.names is not None:
return f"{self.__class__.__name__}: ({', '.join(self.names)})"
return f'{self.__class__.__name__}: ({", ".join(self.names)})'
else:
return f'{self.__class__.__name__}:'

Expand Down
6 changes: 3 additions & 3 deletions src/docplex_extensions/_tuning_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ def _tune(
if not (tuning_name == 'tune.repeat' and batch_mode) and not (
tuning_name == 'tune.measure' and not batch_mode
):
log_header += f' {tuning_name :<40} {tuning_val}\n'
log_header += f' {tuning_name:<40} {tuning_val}\n'

# Log fixed params
log_header += '\nFixed parameters:\n'
if fixed_params_and_values:
for fixed_name, fixed_val in fixed_params_and_values.items():
log_header += f' {fixed_name :<40} {fixed_val}\n'
log_header += f' {fixed_name:<40} {fixed_val}\n'
else:
log_header += ' None\n'

Expand Down Expand Up @@ -246,7 +246,7 @@ def _tune(
if improving_params_and_values: # pragma: no cover
log_footer += 'Tuned parameters:\n'
for tuned_name, tuned_val in improving_params_and_values.items():
log_footer += f' {tuned_name :<40} {tuned_val}\n'
log_footer += f' {tuned_name:<40} {tuned_val}\n'
else:
log_footer += 'The tuning tool could not find a better set of parameters\n'

Expand Down