nebius/SWE-bench-extra huggingface dataset:
Repository: Knio/pynmea2

Issue:
Issues with parshing PASHR sentences
Hi,

Just ran into some troubles when trying to parse an NMEA stream containing PASHR sentences, like below:
```
$PASHR,122144.75,240.68,T,,,,,,,2*04
$PASHR,122144.96,240.30,T,,,,,,,2*04
$PASHR,122145.18,239.91,T,,,,,,,2*06
$PASHR,122145.61,239.04,T,,,,,,,2*04
$PASHR,122145.83,238.59,T,,,,,,,2*01
$PASHR,122146.05,238.13,T,,,,,,,2*02
```

Seems like the special logic for these messages (see [here](https://github.com/Knio/pynmea2/blob/master/pynmea2/types/proprietary/ash.py#L24-L26) and [here](https://github.com/Knio/pynmea2/blob/master/pynmea2/types/proprietary/ash.py#L35-L37)) does not fit the messages that I have. 

The regex in the the last link is not catching the messages due to different number of decimal values in the timestamp. I.e. `122144.75` does not give a match with `'^\d{6}\.\d{3}$'`. Changing the regex to `'^\d{6}\.\d{2,3}$'` seems to do the trick.

Comments:

Patch:
diff --git a/pynmea2/types/proprietary/ash.py b/pynmea2/types/proprietary/ash.py
index d62a10e..0715bef 100644
--- a/pynmea2/types/proprietary/ash.py
+++ b/pynmea2/types/proprietary/ash.py
@@ -34,7 +34,7 @@ class ASHRATT(ASH):
     '''
     @staticmethod
     def match(data):
-        return re.match(r'^\d{6}\.\d{3}$', data[1])
+        return re.match(r'^\d{6}\.\d{2,3}$', data[1])
 
     def __init__(self, *args, **kwargs):
         self.subtype = 'ATT'


Test patch:
diff --git a/test/test_ash.py b/test/test_ash.py
index b33261e..24a2bac 100644
--- a/test/test_ash.py
+++ b/test/test_ash.py
@@ -32,6 +32,13 @@ def test_ashratt():
     assert msg.render() == data
 
 
+def test_ashratt_with_2_vs_3_decimal_timestamp():
+    msg_3 = pynmea2.parse('$PASHR,130533.620,0.311,T,-80.467,-1.395,,0.066,0.067,0.215,2,3*0B')
+    msg_2 = pynmea2.parse('$PASHR,130533.62,0.311,T,-80.467,-1.395,,0.066,0.067,0.215,2,3*3B')
+
+    assert msg_3.timestamp == msg_2.timestamp
+
+
 def test_ash_undefined():
     '''
     Test that non-ATT messages still fall back to the generic ASH type
Repository: KyleJamesWalker/yamlsettings

Issue:
Replace all non-variable characters to underscore in update_from_env
For example:
```python3
import os
import yamlsettings
from yamlsettings.yamldict import YAMLDict

os.environ['FOO_BAR'] = 'barbaz'

settings = YAMLDict({'foo-bar': None})
yamlsettings.update_from_env(settings)

assert settings['foo-bar'] == 'barbaz'
```

Comments:

Patch:
diff --git a/setup.py b/setup.py
index d5957bc..51cbf92 100644
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@ requirements.update(all=sorted(set().union(*requirements.values())))
 
 setup(
     name='yamlsettings',
-    version='2.0.3',
+    version='2.1.0',
     description='Yaml Settings Configuration Module',
     long_description=readme,
     author='Kyle James Walker',
diff --git a/yamlsettings/helpers.py b/yamlsettings/helpers.py
index 50193b2..151b843 100644
--- a/yamlsettings/helpers.py
+++ b/yamlsettings/helpers.py
@@ -49,7 +49,7 @@ def update_from_env(yaml_dict, prefix=None):
         env_path = "{0}{1}{2}".format(
             prefix.upper(),
             '_' if prefix else '',
-            '_'.join([str(key).upper() for key in path])
+            '_'.join([str(key).replace('-', '_').upper() for key in path])
         )
         env_val = os.environ.get(env_path, None)
         if env_val is not None:


Test patch:
diff --git a/tests/test_yamldict.py b/tests/test_yamldict.py
index 66b44c0..747dfb9 100644
--- a/tests/test_yamldict.py
+++ b/tests/test_yamldict.py
@@ -12,7 +12,7 @@ import unittest
 
 from mock import mock_open
 from yamlsettings import (load, load_all, save_all,
-                          update_from_env, update_from_file)
+                          update_from_env, update_from_file, yamldict)
 
 from . import builtin_module, path_override, open_override, isfile_override
 
@@ -228,6 +228,14 @@ class YamlDictTestCase(unittest.TestCase):
         test_defaults.update({'a': (4,)})
         self.assertEqual(test_defaults.a, (4,))
 
+    @mock.patch.dict('os.environ', {'FOO_BAR': 'new-baz'})
+    def test_dash_vars_with_env(self):
+        """Test items with dashes can be overritten with env"""
+        test_settings = yamldict.YAMLDict({'foo-bar': 'baz'})
+        assert test_settings['foo-bar'] == 'baz'
+        update_from_env(test_settings)
+        assert test_settings['foo-bar'] == 'new-baz'
+
 
 if __name__ == '__main__':
     unittest.main()