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

Convert two assignments to augmented source code #498

Open
elfring opened this issue Nov 21, 2021 · 0 comments
Open

Convert two assignments to augmented source code #498

elfring opened this issue Nov 21, 2021 · 0 comments

Comments

@elfring
Copy link

elfring commented Nov 21, 2021

👀 Some source code analysis tools can help to find opportunities for improving software components.
💭 I propose to increase the usage of augmented assignment statements accordingly.

diff --git a/kartothek/io_components/metapartition.py b/kartothek/io_components/metapartition.py
index 7e4636d..17160f0 100644
--- a/kartothek/io_components/metapartition.py
+++ b/kartothek/io_components/metapartition.py
@@ -1266,7 +1266,7 @@ class MetaPartition(Iterable):
             for df in self.data.values():
 
                 if col in df:
-                    possible_values = possible_values | set(df[col].dropna().unique())
+                    possible_values |= set(df[col].dropna().unique())
                     col_in_partition = True
 
             if (self.label is not None) and (not col_in_partition):
diff --git a/kartothek/utils/predicate_converter.py b/kartothek/utils/predicate_converter.py
index 97b4cfb..27c3af0 100644
--- a/kartothek/utils/predicate_converter.py
+++ b/kartothek/utils/predicate_converter.py
@@ -84,5 +84,5 @@ def convert_predicates_to_cube_conditions(
             "please pass a predicate list with one element."
         )
     for predicate in predicates[0]:
-        condition = condition + (write_predicate_as_cube_condition(predicate),)
+        condition += (write_predicate_as_cube_condition(predicate),)
     return condition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant