Przeglądaj źródła

Move commit to commit less often

Foppe Hemminga 6 lat temu
rodzic
commit
d03e6c982f
3 zmienionych plików z 13 dodań i 4 usunięć
  1. 9 0
      .idea/inspectionProfiles/Project_Default.xml
  2. 1 1
      _bs.py
  3. 3 3
      main.py

+ 9 - 0
.idea/inspectionProfiles/Project_Default.xml

@@ -2,5 +2,14 @@
   <profile version="1.0">
     <option name="myName" value="Project Default" />
     <inspection_tool class="DotEnvDuplicateKeyInspection" enabled="false" level="WARNING" enabled_by_default="false" />
+    <inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
+      <option name="ignoredPackages">
+        <value>
+          <list size="1">
+            <item index="0" class="java.lang.String" itemvalue="dotenv" />
+          </list>
+        </value>
+      </option>
+    </inspection_tool>
   </profile>
 </component>

+ 1 - 1
_bs.py

@@ -5,7 +5,7 @@ from pytz import timezone
 import model
 import collections
 # import pytz
-from pprint import pprint
+# from pprint import pprint
 
 """
 This module contains custom methods based on bs4.beautifulsoup to analyze data

+ 3 - 3
main.py

@@ -37,6 +37,8 @@ if __name__ == '__main__':
     # print('interim 2 {}'.format(interim - start))
     # pprint(race_days)
 
+    scratchings_for_database = []
+    messages = []
     for race_day in race_days:
         if not raw_data_dict or not race_day:
             # raw_data_dict may be empty when there is no data available (yet)
@@ -58,8 +60,6 @@ if __name__ == '__main__':
         cur1.close()
 
         # compare retrieved scratchings with new data
-        scratchings_for_database = []
-        messages = []
         for scratching in scratchings:
             found_in_database = False
             # if db_data is None:
@@ -149,7 +149,7 @@ if __name__ == '__main__':
                 long_message = this_message
             else:
                 long_message += '\n' + this_message
-            leftover_message = ''
+            # leftover_message = ''
         else:
             # Send long message (max 6k characters)
             view.broadcast(long_message)