mteb/LocBenchRR huggingface dataset:
moto/core/responses.py `_get_multi_param` bug

> Guidance on **how to reproduce the issue**. Ideally, this should be a
     *small* code sample that can be run immediately by the maintainers.
     Failing that, let us know what you're doing, how often it happens, what
     environment you're using, etc. Be thorough: it prevents us needing to ask
     further questions.
     
- try to execute this code:
```python
fleet_request = {
        'LaunchTemplateConfigs': [
            {
                'LaunchTemplateSpecification': {
                    'LaunchTemplateName': 'test-template-name',
                    'Version': '$Default'
                },
                'Overrides': [ { "InstanceType": "t3.nano" } ]
            }
        ]
    }
ec2_client.create_fleet(**fleet_request)
```

>  Tell us **what you expected to happen**. When we run your example code,
     what are we expecting to happen? What does "success" look like for your
     code?


https://github.com/getmoto/moto/blob/1b91aee1de3d26902c5e79a3adefb8f391fb9876/moto/ec2/responses/fleets.py#L33
```python
# Expected:
(Pdb) print(launch_template_configs)
[{'LaunchTemplateSpecification': {'LaunchTemplateName': 'test-template-name', 'Version': '$Default'}, 'Overrides': [ {'InstanceType': 't3.nano'} ]}]
```

>   Tell us **what actually happens**. It's not helpful for you to say "it
     doesn't work" or "it fails". Tell us *how* it fails: do you get an
     exception? A hang? How was the actual result different from your expected
     result?

```python
# Actually happens, see Overrides section
(Pdb) print(launch_template_configs)
[{'LaunchTemplateSpecification': {'LaunchTemplateName': 'test-template-name', 'Version': '$Default'}, 'Overrides': [ 't3.nano' ]}]
```

https://github.com/getmoto/moto/blob/1b91aee1de3d26902c5e79a3adefb8f391fb9876/moto/core/responses.py#L701
```python
(Pdb) print(self.querystring)
OrderedDict({'Action': ['CreateFleet'],
 'Version': ['2016-11-15'],
 'Type': ['request'],
 'ValidUntil': ['2024-11-14T08:57:24.289912Z'],
 /* ... cropped ... */
 'LaunchTemplateConfigs.1.LaunchTemplateSpecification.LaunchTemplateName': ['test-template-name'],
 'LaunchTemplateConfigs.1.LaunchTemplateSpecification.Version': ['$Default'],
 'LaunchTemplateConfigs.1.Overrides.1.InstanceType': ['t3.nano']
 /* ... cropped ... */})
```

```python
# how it fails
            launch_template_data = launch_template.latest_version().data
            new_launch_template = launch_template_data.copy()
            if config.get("Overrides"):
                for override in config["Overrides"]:
>                   new_launch_template.update(override)
E                   ValueError: dictionary update sequence element #0 has length 1; 2 is required

.venv/lib/python3.13/site-packages/moto/ec2/models/fleets.py:73: ValueError
```

   

>  Tell us **what version of Moto you're using**, and
     **how you installed it**. Tell us whether you're using standalone server
     mode or the Python mocks. If you are using the Python mocks, include the
     version of boto/boto3/botocore.

- `5.0.20`
Reduce cognitive complexity of `gyroradius`
Right now [`plasmapy.formulary.lengths.gyroradius`](https://github.com/PlasmaPy/PlasmaPy/blob/fc12bbd286ae9db82ab313d8c380808b814a462c/plasmapy/formulary/lengths.py#LL102C5-L102C15) has several nested conditionals.  As a consequence, the code for `gyroradius` has high [cognitive complexity](https://www.sonarsource.com/docs/CognitiveComplexity.pdf), which makes it hard to read and hard to change. Part of the reason is that we are enabling `gyroradius` to get the speed perpendicular to the magnetic field using a bunch of methods, while also making sure that `gyroradius` works with `Quantity` arrays and validating inputs.

It would be helpful to clean up the function to reduce its cognitive complexity.  This could include breaking out some of the content of conditionals into private functions, possibly with function names that say what it is doing instead of using comments.

This could be a good first contribution, but would probably require some familiarity with `astropy.units` and `RelativisticBody`.  Pull requests that partially address this would be welcome too.
Positional subpattern of a built-in type subclass with __match_args__ causes type confusion
Given

```python
class PrintableKey(bytes):
    __match_args__ = ('ch', )

    @property
    def ch(self) -> str:
        return self.decode('UTF-8')
```

now

```python
match event:
    case PrintableKey(ch):
        reveal_type(ch)  # mypy thinks it's PrintableKey
```

versus

```python
match event:
    case PrintableKey(ch=ch):
        reveal_type(ch)  # mypy correctly deduces it's str
```

_Originally posted by @mgedmin in https://github.com/python/mypy/issues/13804#issuecomment-2466177933_
[Bug]: Figure.align_labels() confused by GridSpecFromSubplotSpec
### Bug summary

In a composite figure with nested gridspecs, `Figure.align_labels()` (and `align_xlabels()`, `align_ylabels()`) can end up aligning labels that should not intuitively be. Likewise with `align_titles()`.

### Code for reproduction

```Python
fig = plt.figure(figsize=(6, 4))

gs0 = gridspec.GridSpec(nrows=1, ncols=2, figure=fig)
gs00 = gs0[0].subgridspec(nrows=2, ncols=1, height_ratios=[8, 8])
gs01 = gs0[1].subgridspec(nrows=2, ncols=1, height_ratios=[9, 6])

left_axs = gs00.subplots()
right_axs = gs01.subplots()

left_axs[0].set_ylim(0, 0.02)  # to force nontrivial alignment

left_axs[0].set_ylabel('foo')
left_axs[1].set_ylabel('bar')
right_axs[0].set_ylabel('baz')
right_axs[1].set_ylabel('qux')

left_axs[1].set_title('title')
right_axs[1].set_title('title')

fig.align_labels()
fig.align_titles()
```


### Actual outcome

All labels are aligned. Titles are aligned as well.

![image](https://github.com/user-attachments/assets/b78defcf-e742-4643-b8b9-1f66ce375997)

### Expected outcome

Labels in separate columns are aligned, but labels in different columns should not be. Titles are not aligned:

![image](https://github.com/user-attachments/assets/795a7730-b2b3-442b-896f-cdde31b7ff97)


### Additional information

Right now, the ylabel (xlabel) alignment code seems to attempt to align labels on Axes with the same column index (resp. row index) without checking if those indexes are for the same gridspec. To fix this, we should probably add a check that two Axes share the same gridspec (in addition to being in the same row/col) before we align their labels. (This would not allow label alignment across gridspecs, but if a user wants to align labels between two Axes, it seems reasonable to expect them to put the Axes in the same gridspec.)

The same thing happens with align_titles().

For now, a workaround for labels is to call `Figure.align_labels()` separately for each sub-gridspec with the `axs` kwarg (as done for the expected outcome figure above).

### Operating system

macOS 14.1.1

### Matplotlib Version

3.9.2

### Matplotlib Backend

module://matplotlib_inline.backend_inline

### Python version

3.12.2

### Jupyter version

_No response_

### Installation

conda
[ENH] allow `coverage` to be specified in `evaluate` using interval forecats metrics
I am trying to evaluate the model. and one of the outputs that i need is y_pred_interval. For that i add the EmpiricalCoverage metric. It is calculating intervals, but with fixed coverage of 0.9. How to affect it and calculate y_pred_intervals with the different coverage? 

 Example code:

```python
evaluate(
    model,
    cv=cv,
    y=y_df.loc[index],
    X=x_df.loc[index],
    return_data=True,
    backend='loky',
    scoring=[MeanAbsolutePercentageError(), EmpiricalCoverage(), CRPS()],
)
```
[uba] Fix new false negative from #10034
```
def nonlocal_in_outer_frame_ok(callback, condition_a, condition_b):
    def outer():
        nonlocal callback
        def inner():
            if condition_a:
                def inner2():
                    callback()  # possibly-used-before-assignment?
                inner2()
            else:
                if condition_b:
                    def callback():
                        pass
        inner()
    outer()
```
we should probably raise a message here?

_Originally posted by @zenlyj in https://github.com/pylint-dev/pylint/pull/10034#issuecomment-2453421927_
[bug] git.fetch_commit() throws an error when downloading sources to subfolder
### Describe the bug

`conan.tools.scm.Git.fetch_commit()` method throws an error when `folder` argument is passed to Git class constructor:

```python
def source(self):
    git = Git(self, folder="myFolder")
    git.fetch_commit(url, commit=self.conan_data["sources"]["commit"])
``` 

Error message:
```bash
ERROR: mypackage/1.2.3: Error in source() method, line 65
        git.fetch_commit(url, commit=self.conan_data["sources"]["commit"])
        FileNotFoundError: [Errno 2] No such file or directory: 'myFolder'
```

It seems that `mkdir(self.folder)` is missing in the body of `fetch_commit()` method - similarly as it is done in `clone()` method.

### How to reproduce it

_No response_
Add ability to configure `ConcurrenyOptions` to the CLI
### Describe the current behavior

Currently users can set the the concurrency_limit for a deployment when creating it with the CLI by specifying the limit with and int as so: `deploy "my-deployment -cl 1". 

Upcoming work #15291, adds options for handling concurrency limiting which we will need add to the CLI.

### Describe the proposed behavior

I think that it while it's possible to create a custom type in typer and configure them as so `deploy "my-deployment" -cl 1 --concurrency-options = {'collisions-strategy' = 'cancel-new'}`, it makes for a better user experience if we flatten it. This could be done for each subsequent options that gets added and along with sane defaults, users wouldn't be setting a lot of these.

### Example Use

`deploy "my-deployment" -cl 42 --collision-strategy "cancel-new"`

### Additional context

_No response_
Support async functions with `@validate_call` decorator
### Initial Checks

- [X] I confirm that I'm using Pydantic V2

### Description

I'm writing a project using `asgiref`.

When I use `async_to_sync`, I got a error ` UserWarning: async_to_sync was passed a non-async-marked callable`.

I think it's due to `@validate_call` decorator because it's not appear if i delete `@validate_call`.

For example, here is a simple code. The correct output is `True` but actual output is `False`.  How can we fix this bug?

### Example Code

```Python
import asyncio
import inspect

from pydantic import validate_call


@validate_call(validate_return=True)
async def delay_number(n: int) -> int:
    await asyncio.sleep(1)
    return n


if __name__ == "__main__":
    print(inspect.iscoroutinefunction(delay_number))
```


### Python, Pydantic & OS Version

```Text
pydantic version: 2.9.1
        pydantic-core version: 2.23.3
          pydantic-core build: profile=release pgo=false
                 install path: C:\Users\movis\miniconda3\envs\volans_env\Lib\site-packages\pydantic
               python version: 3.11.9 | packaged by Anaconda, Inc. | (main, Apr 19 2024, 16:40:41) [MSC v.1916 64 bit (AMD64)]
                     platform: Windows-10-10.0.22631-SP0
             related packages: fastapi-0.112.4 typing_extensions-4.12.2
                       commit: unknown
```
Cache Model._meta.swapped
Description
	 
Another candidate for caching, like #35232 before.
The Model._meta.swapped property returns the model that this one has been swapped for. Since most models are not swappable (only auth.User is officially swappable), it returns None in nearly all cases.
I found this property was the most called function in Django when profiling a subset of Django’s tests, with:
$ python -m cProfile -o profile runtests.py --parallel 1 *model*
$ python -m pstats profile <<< 'sort ncalls
stats 10000' | less
This showed 439,484 calls to swapped, taking 29ms of the 5.597s test run, or 0.5% of the total runtime.
After adding @cached_property, this is reduced to 3,653 calls, rounding down to 0ms.
Simple query, wrong tables list
Very simple query, wrong tables list! it considers `activity_id` as a table!

```python
sql='ALTER TABLE ride DROP COLUMN activity_id'
list(sqlglot.parse_one(sql, read='mysql').find_all(sqlglot.exp.Table))
# list(sqlglot.parse_one(sql, read='mysql').find_all(sqlglot.exp.Table))
#  0 = {Table} Table(\n  this=Identifier(this=ride, quoted=False))
#  1 = {Table} Table(\n  this=Identifier(this=activity_id, quoted=False))
```