Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-05-20 16:42:41 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2020-05-20 16:58:21 +0300
commit7ab4a15f026a2478dd8ac0ac61cb5e0de36b9748 (patch)
tree384b205a2d37bb0208439e633c24a2ada2ae0798
parentaab58145c5aae11d1ebbd99eaf425901670e8a89 (diff)
Avoid mutable argument default for read_package_dir()
Avoid a potentially mutable argument default for read_package_dir() (hopefully not an issue presently as we don't modify that argument anywhere) B006 Do not use mutable data structures for argument defaults
-rwxr-xr-xcalm/package.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/calm/package.py b/calm/package.py
index dbb3a22..4387e29 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -187,7 +187,10 @@ def clean_hints(p, hints, warnings):
# (return True if problems, False otherwise)
#
-def read_package_dir(packages, basedir, dirpath, files, remove=[], upload=False):
+def read_package_dir(packages, basedir, dirpath, files, remove=None, upload=False):
+ if remove is None:
+ remove = []
+
relpath = os.path.relpath(dirpath, basedir)
# the package name is always the directory name