dyyyyyyyy/swe-rebench-filtered-1150 huggingface dataset:
task: metadata: install: pip install -e .[dev,doc,test]
patch: diff --git a/docs/release-notes/1.10.0.md b/docs/release-notes/1.10.0.md
index afe72f87..9373c273 100644
--- a/docs/release-notes/1.10.0.md
+++ b/docs/release-notes/1.10.0.md
@@ -25,6 +25,7 @@
 * {func}`scanpy.external.pp.harmony_integrate` now runs with 64 bit floats improving reproducibility {pr}`2655` {smaller}`S Dicks`
 * {func}`scanpy.tl.rank_genes_groups` no longer warns that it's default was changed from t-test_overestim_var to t-test {pr}`2798` {smaller}`L Heumos`
 * `scanpy.pp.calculate_qc_metrics` now allows `qc_vars` to be passed as a string {pr}`2859` {smaller}`N Teyssier`
+* {func}`scanpy.pp.scale` now clips `np.ndarray` also at `- max_value` for zero-centering {pr}`2913` {smaller}`S Dicks`
 
 ```{rubric} Docs
 ```
diff --git a/scanpy/preprocessing/_simple.py b/scanpy/preprocessing/_simple.py
index 7fba1a71..8b215886 100644
--- a/scanpy/preprocessing/_simple.py
+++ b/scanpy/preprocessing/_simple.py
@@ -871,7 +871,10 @@ def scale_array(
     # do the clipping
     if max_value is not None:
         logg.debug(f"... clipping at max_value {max_value}")
-        X[X > max_value] = max_value
+        if zero_center:
+            X = np.clip(X, a_min=-max_value, a_max=max_value)
+        else:
+            X[X > max_value] = max_value
     if return_mean_std:
         return X, mean, std
     else:

problem_statement: scale max value only cuts high values
### Please make sure these conditions are met

- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of scanpy.
- [X] (optional) I have confirmed this bug exists on the main branch of scanpy.

### What happened?

Shouldn't max Value for `scale` and zero_center also clip the negative values?

### Minimal code sample

```python
bdata = sc.datasets.pbmc3k()
sc.pp.scale(bdata,max_value= 1)
print(bdata.X.min(),bdata.X.max())
```


### Error output

```pytb
-2.62718 1.0

shouldn't this be -1,1
```


### Versions

scanpy build from github main branch
repo: scverse/scanpy
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/scanpy/tests/test_scaling.py b/scanpy/tests/test_scaling.py
index d6b004c1..ba425e44 100644
--- a/scanpy/tests/test_scaling.py
+++ b/scanpy/tests/test_scaling.py
@@ -104,3 +104,12 @@ def test_mask_string():
     sc.pp.scale(adata, mask_obs="some cells")
     assert np.array_equal(adata.X, X_centered_for_mask)
     assert "mean of some cells" in adata.var.keys()
+
+
+@pytest.mark.parametrize("zero_center", [True, False])
+def test_clip(zero_center):
+    adata = sc.datasets.pbmc3k()
+    sc.pp.scale(adata, max_value=1, zero_center=zero_center)
+    if zero_center:
+        assert adata.X.min() >= -1
+    assert adata.X.max() <= 1
task: metadata: install: pip install -e .
patch: diff --git a/beniget/beniget.py b/beniget/beniget.py
index 9926bf2..ebd8e72 100644
--- a/beniget/beniget.py
+++ b/beniget/beniget.py
@@ -379,7 +379,7 @@ class DefUseChains(ast.NodeVisitor):
 
     def invalid_name_lookup(self, name, scope, precomputed_locals, local_defs):
         # We may hit the situation where we refer to a local variable which is
-        # not bound yet. This is a runtime error in Python, so we try to detec
+        # not bound yet. This is a runtime error in Python, so we try to detect
         # it statically.
 
         # not a local variable => fine
@@ -970,7 +970,9 @@ class DefUseChains(ast.NodeVisitor):
 
     def visit_Nonlocal(self, node):
         for name in node.names:
-            for d in reversed(self._definitions[:-1]):
+            # Exclude global scope
+            global_scope_depth = -self._scope_depths[0]
+            for d in reversed(self._definitions[global_scope_depth: -1]):
                 if name not in d:
                     continue
                 else:

problem_statement: Bug in nonlocal
```
def f():
    nonlocal f
    f = 2
    return f
f()
```

This code does not generate any warnings, while failing with `SyntaxError: no binding for nonlocal 'f' found`. 
repo: serge-sans-paille/beniget
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_chains.py b/tests/test_chains.py
index 4f09d63..e03cd6d 100644
--- a/tests/test_chains.py
+++ b/tests/test_chains.py
@@ -523,6 +523,15 @@ def outer():
         code = "def A():\n x = 1\n class B: nonlocal x; x = x"
         self.check_message(code, [])
 
+    def test_unbound_local_identifier_nonlocal_points_to_global(self):
+        code = "def x():\n nonlocal x\n x = 1"
+        self.check_message(code,
+                           ["W: unbound identifier 'x' at <unknown>:2:1"])
+
+    def test_unbound_local_identifier_nonlocal_points_to_scoped_global(self):
+        code = "if 1:\n def x():\n  nonlocal x\n  x = 1"
+        self.check_message(code,
+                           ["W: unbound identifier 'x' at <unknown>:3:2"])
 
     def test_assign_uses_class_level_name(self):
         code = '''
task: metadata: install: pip install -e .[sqla]
patch: diff --git a/flask_dance/contrib/google.py b/flask_dance/contrib/google.py
index d478700..d3f3cdd 100644
--- a/flask_dance/contrib/google.py
+++ b/flask_dance/contrib/google.py
@@ -27,7 +27,7 @@ def make_google_blueprint(
         client_id (str): The client ID for your application on Google
         client_secret (str): The client secret for your application on Google
         scope (str, optional): comma-separated list of scopes for the OAuth token.
-            Defaults to the "profile" scope.
+            Defaults to the "https://www.googleapis.com/auth/userinfo.profile" scope.
         offline (bool): Whether to request `offline access
             <https://developers.google.com/accounts/docs/OAuth2WebServer#offline>`_
             for the OAuth token. Defaults to False
@@ -53,7 +53,7 @@ def make_google_blueprint(
     :rtype: :class:`~flask_dance.consumer.OAuth2ConsumerBlueprint`
     :returns: A :ref:`blueprint <flask:blueprints>` to attach to your Flask app.
     """
-    scope = scope or ["profile"]
+    scope = scope or ["https://www.googleapis.com/auth/userinfo.profile"]
     authorization_url_params = {}
     if offline:
         authorization_url_params["access_type"] = "offline"

problem_statement: Google scope rename
All of a sudden I'm getting bugs in production with the following warning:
```
Warning: Scope has changed from "profile email" to "https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile".
```

It looks like we need to update https://github.com/singingwolfboy/flask-dance/blob/master/flask_dance/contrib/google.py#L56 and https://github.com/singingwolfboy/flask-dance/blob/master/docs/quickstarts/google.rst accordingly.


repo: singingwolfboy/flask-dance
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/contrib/test_google.py b/tests/contrib/test_google.py
index b75c30a..c96c027 100644
--- a/tests/contrib/test_google.py
+++ b/tests/contrib/test_google.py
@@ -16,7 +16,7 @@ def test_blueprint_factory():
         redirect_to="index",
     )
     assert isinstance(google_bp, OAuth2ConsumerBlueprint)
-    assert google_bp.session.scope == ["profile"]
+    assert google_bp.session.scope == ["https://www.googleapis.com/auth/userinfo.profile"]
     assert google_bp.session.base_url == "https://www.googleapis.com/"
     assert google_bp.session.client_id == "foo"
     assert google_bp.client_secret == "bar"
task: metadata: install: pip install -e .[dev]
patch: diff --git a/dev-requirements.txt b/dev-requirements.txt
index 3c341bc..56e4923 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -10,5 +10,4 @@ pytest==6.2.5
 pytest-cov==3.0.0
 tox==3.8.5
 twine==3.3.0
-typed-ast==1.5.1
 wheel
diff --git a/sendgrid_backend/mail.py b/sendgrid_backend/mail.py
index dd63787..6e6afb7 100644
--- a/sendgrid_backend/mail.py
+++ b/sendgrid_backend/mail.py
@@ -471,6 +471,13 @@ class SendgridBackend(BaseEmailBackend):
                 )
             )
 
+        if hasattr(msg, "reply_to_list") and SENDGRID_6:
+            from sendgrid.helpers.mail import ReplyTo
+
+            mail.reply_to_list = [
+                ReplyTo(*self._parse_email_address(e)) for e in msg.reply_to_list
+            ]
+
         if hasattr(msg, "categories"):
             for cat in msg.categories:
                 mail.add_category(Category(cat))

problem_statement: Add the ability to reply_to_list for Sendgrid
Since [this](https://github.com/sendgrid/sendgrid-oai/blob/main/CHANGELOG.md#2021-09-22-version-180) version, SendGrid has incorporated the ability to reply to a list of emails. It would be beneficial to integrate this capability into this library without any workarounds.
repo: sklarsa/django-sendgrid-v5
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/test/test_mail.py b/test/test_mail.py
index 55ede5e..bb7862a 100644
--- a/test/test_mail.py
+++ b/test/test_mail.py
@@ -727,3 +727,28 @@ class TestMailGeneration(SimpleTestCase):
         assert not tracking_settings["click_tracking"]["enable"]
         assert "ganalytics" in tracking_settings
         assert tracking_settings["ganalytics"]["utm_source"] == "my-source"
+
+    def test_reply_to_list(self):
+        msg = EmailMessage(
+            subject="Hello, World!",
+            body="Hello, World!",
+            from_email="Sam Smith <sam.smith@example.com>",
+            to=["John Doe <john.doe@example.com>", "jane.doe@example.com"],
+            cc=["Stephanie Smith <stephanie.smith@example.com>"],
+            bcc=["Sarah Smith <sarah.smith@example.com>"],
+        )
+
+        msg.reply_to_list = ["John Doe <john.doe@example.com>", "jane.doe@example.com"]
+
+        mail = self.backend._build_sg_mail(msg)
+
+        reply_to_list = mail.get("reply_to_list")
+        if SENDGRID_5:
+            assert not reply_to_list
+        else:
+            assert reply_to_list
+            assert len(reply_to_list) == 2
+            assert reply_to_list[0].get("email") == "john.doe@example.com"
+            assert reply_to_list[0].get("name") == "John Doe"
+            assert reply_to_list[1].get("email") == "jane.doe@example.com"
+            assert not reply_to_list[1].get("name")
task: metadata: install: pip install -e .[dev]
patch: diff --git a/starfish/core/intensity_table/intensity_table.py b/starfish/core/intensity_table/intensity_table.py
index 8f6ab949..01427ba8 100644
--- a/starfish/core/intensity_table/intensity_table.py
+++ b/starfish/core/intensity_table/intensity_table.py
@@ -522,10 +522,11 @@ class IntensityTable(xr.DataArray):
         counts = grouped.count().iloc[:, 0].unstack().fillna(0)
         if self.has_physical_coords:
             grouped = self.to_features_dataframe().groupby([Features.CELL_ID])[[
-                Axes.X, Axes.Y, Axes.ZPLANE, Coordinates.X, Coordinates.Y, Coordinates.Z]]
+                Axes.X.value, Axes.Y.value, Axes.ZPLANE.value, Coordinates.X.value,
+                Coordinates.Y.value, Coordinates.Z.value]]
         else:
             grouped = self.to_features_dataframe().groupby([Features.CELL_ID])[[
-                Axes.X, Axes.Y, Axes.ZPLANE]]
+                Axes.X.value, Axes.Y.value, Axes.ZPLANE.value]]
         min_ = grouped.min()
         max_ = grouped.max()
         coordinate_df = min_ + (max_ - min_) / 2

problem_statement: ExpressionMatrix methods
After target assignment I created an expression matrix (a 2-dimensional cells x genes tensor). 

<img width="589" alt="Screenshot 2019-06-18 at 19 23 41" src="https://user-images.githubusercontent.com/50377927/59705626-0e0e0a80-91ff-11e9-83cd-04fe9d0f25d2.png">

I need to save it for the following usage with single-cell analysis software packages but ExpressionMatrix methods return these kinds of errors.

matrix.save('expression_matrix')

DataArray.name or Dataset key must be either a string or None for serialization to netCDF files

matrix.save_loom('expression_matrix1')

invalid indexer array, does not have integer dtype: array(<Axes.X: 'x'>, dtype=object)

matrix.save_anndata('expression_matrix2')

invalid indexer array, does not have integer dtype: array(<Axes.X: 'x'>, dtype=object)
repo: spacetx/starfish
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/starfish/core/expression_matrix/test/test_serialization.py b/starfish/core/expression_matrix/test/test_serialization.py
index e69de29b..4f712444 100644
--- a/starfish/core/expression_matrix/test/test_serialization.py
+++ b/starfish/core/expression_matrix/test/test_serialization.py
@@ -0,0 +1,28 @@
+import random
+
+from starfish import IntensityTable
+from starfish.core.codebook.test.factories import codebook_array_factory
+from starfish.core.types import Features
+
+NUMBER_SPOTS = 10
+
+
+def test_save_expression_matrix():
+
+    codebook = codebook_array_factory()
+
+    intensities = IntensityTable.synthetic_intensities(
+        codebook,
+        num_z=3,
+        height=100,
+        width=100,
+        n_spots=10
+    )
+    # mock out come cell_ids
+    cell_ids = random.sample(range(1, 20), NUMBER_SPOTS)
+    intensities[Features.CELL_ID] = (Features.AXIS, cell_ids)
+
+    expression_matrix = intensities.to_expression_matrix()
+
+    # test all saving methods
+    expression_matrix.save("expression")
task: metadata: install: pip install -e .
patch: diff --git a/sphinx_gallery/gen_rst.py b/sphinx_gallery/gen_rst.py
index 5d632a5..4100482 100644
--- a/sphinx_gallery/gen_rst.py
+++ b/sphinx_gallery/gen_rst.py
@@ -857,12 +857,13 @@ def save_rst_example(example_rst, example_file, time_elapsed,
 
     binder_text = (" or to run this example in your browser via Binder"
                    if len(binder_conf) else "")
-    example_rst = (".. note::\n"
-                   "    :class: sphx-glr-download-link-note\n\n"
-                   "    Click :ref:`here <sphx_glr_download_{0}>` "
-                   "to download the full example code{1}\n"
-                   ".. rst-class:: sphx-glr-example-title\n\n"
-                   ".. _sphx_glr_{0}:\n\n"
+    example_rst = (".. only:: html\n\n"
+                   "    .. note::\n"
+                   "        :class: sphx-glr-download-link-note\n\n"
+                   "        Click :ref:`here <sphx_glr_download_{0}>` "
+                   "    to download the full example code{1}\n"
+                   "    .. rst-class:: sphx-glr-example-title\n\n"
+                   "    .. _sphx_glr_{0}:\n\n"
                    ).format(ref_fname, binder_text) + example_rst
 
     if time_elapsed >= gallery_conf["min_reported_time"]:

problem_statement: Remove the note linking to the download section at the beginning of the example from latex/pdf output
For latex/pdf output, this note at the beginning of the example linking to the download section does not link to anything (since there are no download buttons). Would it be possible to disable it in that case? The straightforward way would be wrap it into a `.. only:: html` directive.
repo: sphinx-gallery/sphinx-gallery
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/sphinx_gallery/tests/test_gen_rst.py b/sphinx_gallery/tests/test_gen_rst.py
index 911fc6c..d0d0602 100644
--- a/sphinx_gallery/tests/test_gen_rst.py
+++ b/sphinx_gallery/tests/test_gen_rst.py
@@ -417,6 +417,16 @@ def test_remove_config_comments(gallery_conf):
     assert '# sphinx_gallery_thumbnail_number = 1' not in rst
 
 
+def test_download_link_note_only_html(gallery_conf):
+    """Test html only directive for download_link."""
+    rst = _generate_rst(gallery_conf, 'test.py', CONTENT)
+    download_link_note = (".. only:: html\n\n"
+                          "    .. note::\n"
+                          "        :class: sphx-glr-download-link-note\n\n"
+                          )
+    assert download_link_note in rst
+
+
 @pytest.mark.parametrize('ext', ('.txt', '.rst', '.bad'))
 def test_gen_dir_rst(gallery_conf, fakesphinxapp, ext):
     """Test gen_dir_rst."""
task: metadata: install: pip install -e .[dev]
patch: diff --git a/src/sqlfluff/core/dialects/dialect_postgres.py b/src/sqlfluff/core/dialects/dialect_postgres.py
index aac2b6b2c..096374afc 100644
--- a/src/sqlfluff/core/dialects/dialect_postgres.py
+++ b/src/sqlfluff/core/dialects/dialect_postgres.py
@@ -34,6 +34,8 @@ postgres_dialect.insert_lexer_struct(
 # Reserve WITHIN (required for the WithinGroupClauseSegment)
 postgres_dialect.sets("unreserved_keywords").remove("WITHIN")
 postgres_dialect.sets("reserved_keywords").add("WITHIN")
+# Add the EPOCH datetime unit
+postgres_dialect.sets("datetime_units").update(["EPOCH"])
 
 
 postgres_dialect.add(

problem_statement: EPOCH not recognized as a keyword
Hi, I'm using SQLFluff 0.3.6 with the Snowflake dialect and found that when I try to extract the epoch from a timestamp, I get an error about an unqualified reference, which leads me to believe that it's not recognizing the `EPOCH` keyword:

```
SELECT
  EXTRACT(EPOCH FROM t1.sometime) AS myepoch
FROM
  t1
INNER JOIN
  t2 ON t1.pk = t2.pk
```

gives:
```
L:   2 | P:  11 | L027 | Unqualified reference 'EPOCH' found in select with more
                       | than one referenced table/view.
```


repo: sqlfluff/sqlfluff
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/test/core/dialects/postgres_test.py b/test/core/dialects/postgres_test.py
new file mode 100644
index 000000000..d7153b1a1
--- /dev/null
+++ b/test/core/dialects/postgres_test.py
@@ -0,0 +1,23 @@
+"""Tests specific to the postgres dialect."""
+
+import pytest
+
+from sqlfluff.core import FluffConfig, Linter
+
+
+@pytest.mark.parametrize(
+    "raw",
+    [
+        "SELECT t1.field, EXTRACT(EPOCH FROM t1.sometime) AS myepoch FROM t1",
+        "SELECT t1.field, EXTRACT(EPOCH FROM t1.sometime - t1.othertime) AS myepoch FROM t1",
+    ],
+)
+def test_epoch_datetime_unit(raw):
+    """Test the EPOCH keyword for postgres dialect."""
+    # Don't test for new lines or capitalisation
+    cfg = FluffConfig(
+        configs={"core": {"exclude_rules": "L009,L016", "dialect": "postgres"}}
+    )
+    lnt = Linter(config=cfg)
+    result = lnt.lint_string(raw)
+    assert result.num_violations() == 0
diff --git a/test/core/dialects/snowflake_test.py b/test/core/dialects/snowflake_test.py
index 2b7b6cba7..ccc9d2302 100644
--- a/test/core/dialects/snowflake_test.py
+++ b/test/core/dialects/snowflake_test.py
@@ -1,4 +1,4 @@
-"""Tests specific to the ansi dialect."""
+"""Tests specific to the snowflake dialect."""
 
 import pytest
task: metadata: install: pip install -e .[dev]
patch: diff --git a/stan/model.py b/stan/model.py
index 90fc774..8e064a3 100644
--- a/stan/model.py
+++ b/stan/model.py
@@ -24,6 +24,9 @@ class DataJSONEncoder(json.JSONEncoder):
     def default(self, obj):
         if isinstance(obj, np.ndarray):
             return obj.tolist()
+        # unofficially support np.int64, np.int32, etc.
+        if hasattr(obj, "dtype") and np.issubdtype(obj.dtype, np.integer):
+            return int(obj)
         return json.JSONEncoder.default(self, obj)
 
 

problem_statement: numpy int32 and int64 should be silently converted to Python int before sending to Stan
At least two users have complained about this. The following behavior makes me very sympathetic:

```
import numpy as np
x = np.ones(3)
x.sum().astype(int).dtype  # int64!
```

See https://discourse.mc-stan.org/t/typeerror-object-of-type-int64-is-not-json-serializable/24497 for one of the issue reports.

The conversion itself isn't problematic. Python's int type has no problem dealing with a 64-bit integer.
repo: stan-dev/pystan
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_numpy_data.py b/tests/test_numpy_data.py
new file mode 100644
index 0000000..b6d91ab
--- /dev/null
+++ b/tests/test_numpy_data.py
@@ -0,0 +1,33 @@
+import numpy as np
+import pytest
+
+import stan
+
+program_code = """
+    data {
+    int<lower=0> N;
+    int<lower=0,upper=1> y[N];
+    }
+    parameters {
+    real<lower=0,upper=1> theta;
+    }
+    model {
+    for (n in 1:N)
+        y[n] ~ bernoulli(theta);
+    }
+    """
+
+
+def test_unsupported_type():
+    data = {"N": np.float32(10), "y": [0, 1, 0, 0, 0, 0, 0, 0, 0, 1]}
+    with pytest.raises(TypeError, match="Object of type float32 is not JSON serializable"):
+        stan.build(program_code, data=data, random_seed=1)
+
+
+def test_numpy_integer_types():
+    data = {"N": np.int64(10), "y": [0, 1, 0, 0, 0, 0, 0, 0, 0, 1]}
+    assert stan.build(program_code, data=data, random_seed=1) is not None
+    data = {"N": np.int32(10), "y": [0, 1, 0, 0, 0, 0, 0, 0, 0, 1]}
+    assert stan.build(program_code, data=data, random_seed=1) is not None
+    data = {"N": np.int16(10), "y": [0, 1, 0, 0, 0, 0, 0, 0, 0, 1]}
+    assert stan.build(program_code, data=data, random_seed=1) is not None
task: metadata: install: pip install -e .[dev]
patch: diff --git a/src/streamlink/plugins/skai.py b/src/streamlink/plugins/skai.py
index 61fba7ec..d43fcafd 100644
--- a/src/streamlink/plugins/skai.py
+++ b/src/streamlink/plugins/skai.py
@@ -3,20 +3,15 @@ import re
 from streamlink.plugin import Plugin
 from streamlink.plugin.api import validate
 
-YOUTUBE_URL = "https://www.youtube.com/watch?v={0}"
-_url_re = re.compile(r'http(s)?://www\.skai.gr/.*')
-_youtube_id = re.compile(r'<span\s+itemprop="contentUrl"\s+href="(.*)"></span>', re.MULTILINE)
-_youtube_url_schema = validate.Schema(
-    validate.all(
-        validate.transform(_youtube_id.search),
-        validate.any(
-            None,
-            validate.all(
-                validate.get(1),
-                validate.text
-            )
-        )
-    )
+
+_url_re = re.compile(r'http(s)?://www\.skai(?:tv)?.gr/.*')
+_api_url = "http://www.skaitv.gr/json/live.php"
+_api_res_schema = validate.Schema(validate.all(
+    validate.get("now"),
+    {
+        "livestream": validate.url()
+    },
+    validate.get("livestream"))
 )
 
 
@@ -26,9 +21,10 @@ class Skai(Plugin):
         return _url_re.match(url)
 
     def _get_streams(self):
-        channel_id = self.session.http.get(self.url, schema=_youtube_url_schema)
-        if channel_id:
-            return self.session.streams(YOUTUBE_URL.format(channel_id))
+        api_res = self.session.http.get(_api_url)
+        yt_url = self.session.http.json(api_res, schema=_api_res_schema)
+        if yt_url:
+            return self.session.streams(yt_url)
 
 
 __plugin__ = Skai

problem_statement: Skai plugin broken
<!--
Thanks for reporting a plugin issue!
USE THE TEMPLATE. Otherwise your plugin issue may be rejected.

First, see the contribution guidelines:
https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink

Also check the list of open and closed plugin issues:
https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22

Please see the text preview to avoid unnecessary formatting errors.
-->


## Plugin Issue

- [x] This is a plugin issue and I have read the contribution guidelines.


### Description

Skai plugin is broken since yesterday, but actually it is no longer needed because they provide a lot more stable stream (they don't change stream three or so times a day). **Imho it can be removed.**

New live url as follows:

http://www.skaitv.gr/live

repo: streamlink/streamlink
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/plugins/test_skai.py b/tests/plugins/test_skai.py
index f2347407..f07e61ee 100644
--- a/tests/plugins/test_skai.py
+++ b/tests/plugins/test_skai.py
@@ -7,6 +7,7 @@ class TestPluginSkai(unittest.TestCase):
     def test_can_handle_url(self):
         should_match = [
             'http://www.skai.gr/player/tvlive/',
+            'http://www.skaitv.gr/live',
         ]
         for url in should_match:
             self.assertTrue(Skai.can_handle_url(url))
task: metadata: install: pip install -e .[dev]
patch: diff --git a/src/streamlink/plugins/vidio.py b/src/streamlink/plugins/vidio.py
index 50b05a46..11b8ced6 100644
--- a/src/streamlink/plugins/vidio.py
+++ b/src/streamlink/plugins/vidio.py
@@ -6,6 +6,7 @@ $type live, vod
 import logging
 import re
 from urllib.parse import urlsplit, urlunsplit
+from uuid import uuid4
 
 from streamlink.plugin import Plugin, pluginmatcher
 from streamlink.plugin.api import validate
@@ -17,7 +18,7 @@ log = logging.getLogger(__name__)
 
 
 @pluginmatcher(re.compile(
-    r"https?://(?:www\.)?vidio\.com/",
+    r"https?://(?:www\.)?vidio\.com/.+",
 ))
 class Vidio(Plugin):
     tokens_url = "https://www.vidio.com/live/{id}/tokens"
@@ -28,6 +29,10 @@ class Vidio(Plugin):
             self.tokens_url.format(id=stream_id),
             params={"type": stream_type},
             headers={"Referer": self.url},
+            cookies={
+                "ahoy_visit": str(uuid4()),
+                "ahoy_visitor": str(uuid4()),
+            },
             schema=validate.Schema(
                 validate.parse_json(),
                 {"token": str},

problem_statement: plugins.vidio: 403 Client Error on stream token acquirement
### Checklist

- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Streamlink version

Unable to open URL: https://www.vidio.com/live/204/tokens (403 Client Error: Forbidden for url: https://www.vidio.com/live/204/tokens?type=hls)

### Description

The live stream:  https://www.vidio.com/live/204-sctv
the output: https://www.vidio.com/live/204/tokens (403 Client Error: Forbidden for url: https://www.vidio.com/live/204/tokens?type=hls)

It is missing sctv

### Debug log

```text
streamlink https://www.vidio.com/live/204-sctv best
[cli][info] Found matching plugin vidio for URL https://www.vidio.com/live/204-sctv
error: Unable to open URL: https://www.vidio.com/live/204/tokens (403 Client Error: Forbidden for url: https://www.vidio.com/live/204/tokens?type=hls)
```

repo: streamlink/streamlink
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/plugins/test_vidio.py b/tests/plugins/test_vidio.py
index 970dd455..4fdf269c 100644
--- a/tests/plugins/test_vidio.py
+++ b/tests/plugins/test_vidio.py
@@ -12,6 +12,5 @@ class TestPluginCanHandleUrlVidio(PluginCanHandleUrl):
     ]
 
     should_not_match = [
-        "http://www.vidio.com",
-        "https://www.vidio.com",
+        "https://www.vidio.com/",
     ]
task: metadata: install: pip install -e .[dev]
patch: diff --git a/src/streamlink/plugins/nicolive.py b/src/streamlink/plugins/nicolive.py
index 51411463..45596cc6 100644
--- a/src/streamlink/plugins/nicolive.py
+++ b/src/streamlink/plugins/nicolive.py
@@ -116,9 +116,9 @@ class NicoLiveHLSStream(HLSStream):
         self.wsclient = wsclient
 
 
-@pluginmatcher(re.compile(
-    r"https?://(?P<domain>live\d*\.nicovideo\.jp)/watch/(lv|co)\d+",
-))
+@pluginmatcher(
+    re.compile(r"https?://(?P<domain>live\d*\.nicovideo\.jp)/watch/(lv|co|user/)\d+"),
+)
 @pluginargument(
     "email",
     sensitive=True,

problem_statement: plugins.nicolive: Community has been deprecated
### Checklist

- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Collaboration

- [X] [I will provide feedback should a pull request be opened with a fix for the plugin](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback)

### Streamlink version

6.8.3

### Description

The static room url format is changed as nico community has been deprecated.

before: https://live.nicovideo.jp/watch/co3618724
now: https://live.nicovideo.jp/watch/user/16128426

### Debug log

```text
/
```

repo: streamlink/streamlink
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/plugins/test_nicolive.py b/tests/plugins/test_nicolive.py
index 9e4b8eb0..6be23fa0 100644
--- a/tests/plugins/test_nicolive.py
+++ b/tests/plugins/test_nicolive.py
@@ -10,12 +10,12 @@ class TestPluginCanHandleUrlNicoLive(PluginCanHandleUrl):
     __plugin__ = NicoLive
 
     should_match = [
-        "https://live2.nicovideo.jp/watch/lv534562961",
-        "http://live2.nicovideo.jp/watch/lv534562961",
-        "https://live.nicovideo.jp/watch/lv534562961",
-        "https://live2.nicovideo.jp/watch/lv534562961?ref=rtrec&zroute=recent",
-        "https://live.nicovideo.jp/watch/co2467009?ref=community",
-        "https://live.nicovideo.jp/watch/co2619719",
+        "https://live.nicovideo.jp/watch/lv123",
+        "https://live2.nicovideo.jp/watch/lv123",
+        "https://live2.nicovideo.jp/watch/lv123?ref=rtrec&zroute=recent",
+        "https://live.nicovideo.jp/watch/co456?ref=community",
+        "https://live.nicovideo.jp/watch/co456",
+        "https://live.nicovideo.jp/watch/user/789",
     ]
task: metadata: install: pip install -e .[test]
patch: diff --git a/tableauserverclient/models/user_item.py b/tableauserverclient/models/user_item.py
index 1e4f54a..2df6764 100644
--- a/tableauserverclient/models/user_item.py
+++ b/tableauserverclient/models/user_item.py
@@ -119,7 +119,7 @@ class UserItem(object):
 
     @classmethod
     def from_response(cls, resp):
-        all_user_items = set()
+        all_user_items = []
         parsed_response = ET.fromstring(resp)
         all_user_xml = parsed_response.findall('.//t:user', namespaces=NAMESPACE)
         for user_xml in all_user_xml:
@@ -128,7 +128,7 @@ class UserItem(object):
             user_item = cls(name, site_role)
             user_item._set_values(id, name, site_role, last_login, external_auth_user_id,
                                   fullname, email, auth_setting, domain_name)
-            all_user_items.add(user_item)
+            all_user_items.append(user_item)
         return all_user_items
 
     @staticmethod

problem_statement: Pager with users throws TypeError
I am trying to extract the list of users using the Pager:
`print(*TSC.Pager(tableau.users))`

I get the following error:

`  File "metalab_users.py", line 74, in <module>
    print(*tableau_users)
  File "C:\Program Files\Python35\lib\site-packages\tableauserverclient\server\pager.py", line 30, in __iter__
    yield current_item_list.pop(0)
TypeError: pop() takes no arguments (1 given)`

When calling projects with the same code, I get no such error:
`print(*TSC.Pager(tableau.projects))`
repo: tableau/server-client-python
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/test/test_user.py b/test/test_user.py
index 556cd62..fa83443 100644
--- a/test/test_user.py
+++ b/test/test_user.py
@@ -54,7 +54,7 @@ class UserTests(unittest.TestCase):
             all_users, pagination_item = self.server.users.get()
 
         self.assertEqual(0, pagination_item.total_available)
-        self.assertEqual(set(), all_users)
+        self.assertEqual([], all_users)
 
     def test_get_before_signin(self):
         self.server._auth_token = None
task: metadata: install: pip install -e .[dev]
patch: diff --git a/xsdata/formats/dataclass/parsers/nodes.py b/xsdata/formats/dataclass/parsers/nodes.py
index 6d2c12fb..3ae59922 100644
--- a/xsdata/formats/dataclass/parsers/nodes.py
+++ b/xsdata/formats/dataclass/parsers/nodes.py
@@ -463,14 +463,20 @@ class NodeParser(PushParser):
             item = queue[-1]
             child = item.child(qname, attrs, ns_map, len(objects))
         except IndexError:
+            xsi_type = ParserUtils.xsi_type(attrs, ns_map)
 
+            # Match element qname directly
             if clazz is None:
                 clazz = self.context.find_type(qname)
 
+            # Root is xs:anyType try xsi:type
+            if clazz is None and xsi_type:
+                clazz = self.context.find_type(xsi_type)
+
+            # Exit if we still have no binding model
             if clazz is None:
                 raise ParserError(f"No class found matching root: {qname}")
 
-            xsi_type = ParserUtils.xsi_type(attrs, ns_map)
             meta = self.context.fetch(clazz, xsi_type=xsi_type)
             derived = xsi_type is not None and meta.qname != qname
 

problem_statement: Support xs:anyType root elements
```xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">			
  <xs:complexType name="t">
	<xs:attribute ref="xml:blah"/>
  </xs:complexType>
</xs:schema>
```

```xml
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="t" xml:blah="a"/>
```

Doc is not defined anywhere
repo: tefra/xsdata
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/formats/dataclass/parsers/test_nodes.py b/tests/formats/dataclass/parsers/test_nodes.py
index d73c5d53..20b2a5c3 100644
--- a/tests/formats/dataclass/parsers/test_nodes.py
+++ b/tests/formats/dataclass/parsers/test_nodes.py
@@ -752,12 +752,32 @@ class NodeParserTests(TestCase):
         self.assertEqual(expected_node, queue[0])
 
         with self.assertRaises(ParserError) as cm:
-            parser.start(None, [], [], "{unknown}hopefully", [], {})
+            parser.start(None, [], [], "{unknown}hopefully", {}, {})
 
         self.assertEqual(
             "No class found matching root: {unknown}hopefully", str(cm.exception)
         )
 
+    def test_start_with_any_type_root(self):
+        parser = self.parser
+        queue = []
+        objects = []
+
+        attrs = {QNames.XSI_TYPE: "bk:books"}
+        ns_map = {"bk": "urn:books", "xsi": Namespace.XSI.uri}
+        expected_node = ElementNode(
+            position=0,
+            context=parser.context,
+            meta=parser.context.build(Books),
+            config=parser.config,
+            attrs=attrs,
+            ns_map=ns_map,
+            derived=True,
+        )
+        parser.start(None, queue, objects, "doc", attrs, ns_map)
+        self.assertEqual(1, len(queue))
+        self.assertEqual(expected_node, queue[0])
+
     def test_start_with_derived_class(self):
         a = make_dataclass("a", fields=[])
         b = make_dataclass("b", fields=[], bases=(a,))
task: metadata: install: pip install -e .[dev]
patch: diff --git a/envyaml/envyaml.py b/envyaml/envyaml.py
index d02118a..e0ba807 100644
--- a/envyaml/envyaml.py
+++ b/envyaml/envyaml.py
@@ -30,15 +30,21 @@ RE_COMMENTS = re.compile(r"(^#.*\n)", re.MULTILINE | re.UNICODE)
 RE_DOT_ENV = re.compile(r"^((?!\d)[\w\- ]+=.*)$", re.MULTILINE | re.UNICODE)
 
 RE_ENV = [
-    (re.compile(r"(?<=\$\{)(.*?)(?=\})", re.MULTILINE | re.UNICODE), ["${{{match}}}"]),
+    (
+        re.compile(r"(?<=\$\{)(.*?)(?=\})", re.MULTILINE | re.UNICODE),
+        ["${{{match}}}"]
+    ),
     (
         re.compile(r"(?<=[\"\']\$)(.*?)(?=[\"\']$)", re.MULTILINE | re.UNICODE),
         ['"${match}"', "'${match}'"],
     ),
-    (re.compile(r"\$(?!\d)(.*)", re.MULTILINE | re.UNICODE), ["{match}"]),
+    (
+        re.compile(r"\$(?!\d)(.*)(?<![\s\]])", re.MULTILINE | re.UNICODE),
+        ["{match}"]
+    ),
 ]
 
-__version__ = "1.1.201202"
+__version__ = "1.2.201222"
 
 
 class EnvYAML:
@@ -138,8 +144,8 @@ class EnvYAML:
                 name, value = line.strip().split("=", 1)  # type: str,str
 
                 # strip names and values
-                name = name.strip().strip("'\"")
-                value = value.strip().strip("'\"")
+                name = name.strip().strip("'\" ")
+                value = value.strip().strip("'\" ")
 
                 # set config
                 config[name] = value

problem_statement: Parsing fails with inline list
I had the below structure in a config file and the parsing 

```
mail:
    to: [ $HANDLERS_SMTP_TO ]
```

I get the following error
`ValueError: Strict mode enabled, variable $SMTP_HANDLER_TO] not defined!`

The below works just fine though

```
mail:
    to:
        - $HANDLERS_SMTP_TO
```
repo: thesimj/envyaml
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/env.test.yaml b/tests/env.test.yaml
index 156ae33..7f97a5c 100644
--- a/tests/env.test.yaml
+++ b/tests/env.test.yaml
@@ -77,6 +77,9 @@ empty:
   novalues:
   noenvvalue: $EMPTY_ENV|""
 
+var_in_array:
+  to: [ $USERNAME ]
+
 #
 # Comments
 #
diff --git a/tests/test_envyaml.py b/tests/test_envyaml.py
index dba827a..b45941f 100644
--- a/tests/test_envyaml.py
+++ b/tests/test_envyaml.py
@@ -284,3 +284,10 @@ def test_it_should_return_proper_formatted_string():
 def test_it_should_raise_exception_in_strict_mode():
     with pytest.raises(ValueError):
         EnvYAML("tests/env.ignored.yaml")
+
+
+def test_it_should_parser_environment_inside_array_and_object():
+    env = EnvYAML("tests/env.test.yaml", env_file="tests/test.env")
+
+    # assert array
+    assert env['var_in_array.to.0'] == 'env-username'
task: metadata: install: pip install -e .[dev]
patch: diff --git a/sqlglot/dialects/redshift.py b/sqlglot/dialects/redshift.py
index 0a6683f6..813ee5f2 100644
--- a/sqlglot/dialects/redshift.py
+++ b/sqlglot/dialects/redshift.py
@@ -41,7 +41,6 @@ class Redshift(Postgres):
 
         KEYWORDS = {
             **Postgres.Tokenizer.KEYWORDS,  # type: ignore
-            "COPY": TokenType.COMMAND,
             "ENCODE": TokenType.ENCODE,
             "GEOMETRY": TokenType.GEOMETRY,
             "GEOGRAPHY": TokenType.GEOGRAPHY,
diff --git a/sqlglot/tokens.py b/sqlglot/tokens.py
index 42978f61..8cf17a7e 100644
--- a/sqlglot/tokens.py
+++ b/sqlglot/tokens.py
@@ -697,6 +697,7 @@ class Tokenizer(metaclass=_Tokenizer):
         "ALTER VIEW": TokenType.COMMAND,
         "ANALYZE": TokenType.COMMAND,
         "CALL": TokenType.COMMAND,
+        "COPY": TokenType.COMMAND,
         "EXPLAIN": TokenType.COMMAND,
         "OPTIMIZE": TokenType.COMMAND,
         "PREPARE": TokenType.COMMAND,

problem_statement: snowflake: transpiling "COPY INTO" raises ParseError
In snowflake I can do `COPY INTO NEW_TABLE ( "foo", "bar")  FROM ( SELECT $1, $2, $3, $4 FROM @%old_table)`.  In sqlglot I get `ParseError`:

```python
import sqlglot

print(sqlglot.transpile('COPY INTO NEW_TABLE ( "foo", "bar")  FROM ( SELECT $1, $2, $3, $4 FROM @%old_table)', 'snowflake'))
```

I'm on sqlglot 11.0.0, python 3.10.4.
repo: tobymao/sqlglot
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/dialects/test_snowflake.py b/tests/dialects/test_snowflake.py
index be2e313c..201cc4e8 100644
--- a/tests/dialects/test_snowflake.py
+++ b/tests/dialects/test_snowflake.py
@@ -9,6 +9,9 @@ class TestSnowflake(Validator):
         self.validate_identity("SELECT REGEXP_LIKE(a, b, c)")
         self.validate_identity("PUT file:///dir/tmp.csv @%table")
         self.validate_identity("CREATE TABLE foo (bar FLOAT AUTOINCREMENT START 0 INCREMENT 1)")
+        self.validate_identity(
+            'COPY INTO NEW_TABLE ("foo", "bar") FROM (SELECT $1, $2, $3, $4 FROM @%old_table)'
+        )
 
         self.validate_all(
             "CREATE OR REPLACE TEMPORARY TABLE x (y NUMBER IDENTITY(0, 1))",
task: metadata: install: pip install -e .[dev]
patch: diff --git a/sqlglot/tokens.py b/sqlglot/tokens.py
index 81992f28..ae565ee0 100644
--- a/sqlglot/tokens.py
+++ b/sqlglot/tokens.py
@@ -953,8 +953,10 @@ class Tokenizer(metaclass=_Tokenizer):
         comment_end = self._COMMENTS[comment_start]  # type: ignore
 
         if comment_end:
-            comment_end_size = len(comment_end)
+            # Skip the comment's start delimiter
+            self._advance(comment_start_size)
 
+            comment_end_size = len(comment_end)
             while not self._end and self._chars(comment_end_size) != comment_end:
                 self._advance()
 

problem_statement: support division in a comment
`select 1 /*/2 */` will raise error, while it is valid query.
As far as I understend issue is that combination /*/ is treated like start and end of comment, while it is not
repo: tobymao/sqlglot
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_tokens.py b/tests/test_tokens.py
index 8481f4d1..231f30b0 100644
--- a/tests/test_tokens.py
+++ b/tests/test_tokens.py
@@ -14,6 +14,7 @@ class TestTokens(unittest.TestCase):
             ("foo", []),
             ("foo /*comment 1*/ /*comment 2*/", ["comment 1", "comment 2"]),
             ("foo\n-- comment", [" comment"]),
+            ("1 /*/2 */", ["/2 "]),
         ]
 
         for sql, comment in sql_comment:
diff --git a/tests/test_transpile.py b/tests/test_transpile.py
index b954da21..e6af6cd2 100644
--- a/tests/test_transpile.py
+++ b/tests/test_transpile.py
@@ -87,6 +87,7 @@ class TestTranspile(unittest.TestCase):
         self.validate("SELECT 3>=3", "SELECT 3 >= 3")
 
     def test_comments(self):
+        self.validate("SELECT 1 /*/2 */", "SELECT 1 /* /2 */")
         self.validate("SELECT */*comment*/", "SELECT * /* comment */")
         self.validate(
             "SELECT * FROM table /*comment 1*/ /*comment 2*/",
task: metadata: install: pip install -e .[dev]
patch: diff --git a/sqlglot/dialects/bigquery.py b/sqlglot/dialects/bigquery.py
index 491b299f..cdf25347 100644
--- a/sqlglot/dialects/bigquery.py
+++ b/sqlglot/dialects/bigquery.py
@@ -138,7 +138,6 @@ class BigQuery(Dialect):
             "BEGIN TRANSACTION": TokenType.BEGIN,
             "CURRENT_DATETIME": TokenType.CURRENT_DATETIME,
             "DECLARE": TokenType.COMMAND,
-            "GEOGRAPHY": TokenType.GEOGRAPHY,
             "FLOAT64": TokenType.DOUBLE,
             "INT64": TokenType.BIGINT,
             "BYTES": TokenType.BINARY,
diff --git a/sqlglot/dialects/redshift.py b/sqlglot/dialects/redshift.py
index 09ddf644..eebe3029 100644
--- a/sqlglot/dialects/redshift.py
+++ b/sqlglot/dialects/redshift.py
@@ -58,8 +58,6 @@ class Redshift(Postgres):
 
         KEYWORDS = {
             **Postgres.Tokenizer.KEYWORDS,  # type: ignore
-            "GEOMETRY": TokenType.GEOMETRY,
-            "GEOGRAPHY": TokenType.GEOGRAPHY,
             "HLLSKETCH": TokenType.HLLSKETCH,
             "SUPER": TokenType.SUPER,
             "SYSDATE": TokenType.CURRENT_TIMESTAMP,
diff --git a/sqlglot/tokens.py b/sqlglot/tokens.py
index 53e79d40..5ba47395 100644
--- a/sqlglot/tokens.py
+++ b/sqlglot/tokens.py
@@ -551,6 +551,8 @@ class Tokenizer(metaclass=_Tokenizer):
         "FOREIGN KEY": TokenType.FOREIGN_KEY,
         "FORMAT": TokenType.FORMAT,
         "FROM": TokenType.FROM,
+        "GEOGRAPHY": TokenType.GEOGRAPHY,
+        "GEOMETRY": TokenType.GEOMETRY,
         "GLOB": TokenType.GLOB,
         "GROUP BY": TokenType.GROUP_BY,
         "GROUPING SETS": TokenType.GROUPING_SETS,

problem_statement: Include support for GEOGRAPHY fields in Snowflake dialect
**Is your feature request related to a problem? Please describe.**
While trying to parse a Snowflake `CREATE OR REPLACE` statement that includes a field of type `GEOGRAPHY`, the parsing fails.

**Describe the solution you'd like**
The parser to recognize `GEOGRAPHY` as a valid Snowflake type.

repo: tobymao/sqlglot
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/dialects/test_snowflake.py b/tests/dialects/test_snowflake.py
index c2d4a3cd..46f27e3b 100644
--- a/tests/dialects/test_snowflake.py
+++ b/tests/dialects/test_snowflake.py
@@ -6,6 +6,7 @@ class TestSnowflake(Validator):
     dialect = "snowflake"
 
     def test_snowflake(self):
+        self.validate_identity("CAST(x AS GEOMETRY)")
         self.validate_identity("OBJECT_CONSTRUCT(*)")
         self.validate_identity("SELECT TO_DATE('2019-02-28') + INTERVAL '1 day, 1 year'")
         self.validate_identity("SELECT CAST('2021-01-01' AS DATE) + INTERVAL '1 DAY'")
@@ -558,6 +559,7 @@ class TestSnowflake(Validator):
         )
 
     def test_ddl(self):
+        self.validate_identity("CREATE TABLE geospatial_table (id INT, g GEOGRAPHY)")
         self.validate_identity("CREATE MATERIALIZED VIEW a COMMENT='...' AS SELECT 1 FROM x")
         self.validate_identity("CREATE DATABASE mytestdb_clone CLONE mytestdb")
         self.validate_identity("CREATE SCHEMA mytestschema_clone CLONE testschema")
task: metadata: install: pip install -e .[dev]
patch: diff --git a/sqlglot/dialects/postgres.py b/sqlglot/dialects/postgres.py
index f9b1cf33..8c2a4ab8 100644
--- a/sqlglot/dialects/postgres.py
+++ b/sqlglot/dialects/postgres.py
@@ -183,6 +183,7 @@ def _to_timestamp(args: t.List) -> exp.Expression:
 
 
 class Postgres(Dialect):
+    INDEX_OFFSET = 1
     NULL_ORDERING = "nulls_are_large"
     TIME_FORMAT = "'YYYY-MM-DD HH24:MI:SS'"
     TIME_MAPPING = {

problem_statement: Postgres array indexes are incorrectly incremented when transpiling to Trino
Both Postgres and Trino are 1-indexed, but SQLGlot adds a 1.

```
>>> sqlglot.__version__
'16.1.3'
>>> sqlglot.transpile("select col[1]", read='postgres', write='trino')[0]
Applying array index offset (1)
'SELECT col[2]'
```
repo: tobymao/sqlglot
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/dialects/test_postgres.py b/tests/dialects/test_postgres.py
index 10262471..48a89c3a 100644
--- a/tests/dialects/test_postgres.py
+++ b/tests/dialects/test_postgres.py
@@ -107,6 +107,16 @@ class TestPostgres(Validator):
             },
         )
 
+    def test_array_offset(self):
+        self.validate_all(
+            "SELECT col[1]",
+            write={
+                "hive": "SELECT col[0]",
+                "postgres": "SELECT col[1]",
+                "presto": "SELECT col[1]",
+            },
+        )
+
     def test_postgres(self):
         self.validate_identity("CAST(x AS INT4RANGE)")
         self.validate_identity("CAST(x AS INT4MULTIRANGE)")