Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common_helper_files
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
common_helper_files
Commits
9e35a725
Commit
9e35a725
authored
7 years ago
by
Peter Weidenbach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pytest config added and pep8 corrections
parent
1c67a116
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletions
+6
-1
.gitignore
.gitignore
+1
-0
fail_safe_file_operations.py
common_helper_files/fail_safe_file_operations.py
+1
-1
pytest.ini
pytest.ini
+4
-0
No files found.
.gitignore
View file @
9e35a725
...
...
@@ -9,3 +9,4 @@ dist/
__pycache__/
*.so
*~
.cache
This diff is collapsed.
Click to expand it.
common_helper_files/fail_safe_file_operations.py
View file @
9e35a725
...
...
@@ -83,7 +83,7 @@ def _get_counted_file_path(original_path):
tmp
=
re
.
search
(
r"-([0-9]+)\Z"
,
original_path
)
if
tmp
is
not
None
:
current_count
=
int
(
tmp
.
group
(
1
))
new_file_path
=
re
.
sub
(
r"-[0-9]+\Z"
,
"-{}"
.
format
(
current_count
+
1
),
original_path
)
new_file_path
=
re
.
sub
(
r"-[0-9]+\Z"
,
"-{}"
.
format
(
current_count
+
1
),
original_path
)
else
:
new_file_path
=
"{}-1"
.
format
(
original_path
)
return
new_file_path
...
...
This diff is collapsed.
Click to expand it.
pytest.ini
0 → 100644
View file @
9e35a725
[pytest]
addopts
=
--pep8 -v
pep8ignore
=
*.py E501
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment