internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: napalm-automation/napalm

Issue:
Fix simple typo: themselvs -> themselves
# Issue Type

[x] Bug (Typo)

# Steps to Replicate

1. Examine napalm/base/base.py.
2. Search for `themselvs`.

# Expected Behaviour

1. Should read `themselves`.




Discussion:

Resolving patch:
diff --git a/napalm/base/base.py b/napalm/base/base.py
--- a/napalm/base/base.py
+++ b/napalm/base/base.py
@@ -904,7 +904,7 @@ def get_interfaces_ip(self):
         Returns all configured IP addresses on all interfaces as a dictionary of dictionaries.
         Keys of the main dictionary represent the name of the interface.
         Values of the main dictionary represent are dictionaries that may consist of two keys
-        'ipv4' and 'ipv6' (one, both or none) which are themselvs dictionaries witht the IP
+        'ipv4' and 'ipv6' (one, both or none) which are themselves dictionaries with the IP
         addresses as keys.
         Each IP Address dictionary has the following keys:
 


Test patch:
Repository: napalm-automation/napalm

Issue:
Helper function should support XML namespace prefixes
### Description of Issue/Question
`napalm.base.helpers.find_txt` extracts text value from an XML tree using XPath.  Current implementation doesn't support XML namespace prefixes.  Here's an example of the desired support:

```python
from napalm.base.helpers import find_txt
from lxml import etree as ETREE

ns = {
  'p1': 'http://some/rather/long/namespace',
  'p2': 'http://another/rather/long/namespace',
}

xml_str = '''
<a xmlns="http://some/rather/long/namespace">
  <b xmlns="http://another/rather/long/namespace">value</b>
</a>
'''
xml_tree = ETREE.fromstring(xml_str)

print(find_txt(xml_tree, '/p1:a/p2:b', namespaces=ns))
```

### Did you follow the steps from https://github.com/napalm-automation/napalm#faq
(Place an ``x`` between the square brackets where applicable)

- [x] Yes
- [] No


### Setup

### napalm version
(Paste verbatim output from `pip freeze | grep napalm` between quotes below)

```
$ pip freeze | grep napalm
napalm==2.5.0
$
```

### Network operating system version
(Paste verbatim output from `show version` - or equivalent - between quotes below)

```
N/A
```

### Steps to Reproduce the Issue

### Error Traceback
(Paste the complete traceback of the exception between quotes below)

```
N/A
```



Discussion:

Resolving patch:
diff --git a/napalm/base/helpers.py b/napalm/base/helpers.py
--- a/napalm/base/helpers.py
+++ b/napalm/base/helpers.py
@@ -244,19 +244,22 @@ def textfsm_extractor(cls, template_name, raw_text):
     )
 
 
-def find_txt(xml_tree, path, default=""):
+def find_txt(xml_tree, path, default="", namespaces=None):
     """
     Extracts the text value from an XML tree, using XPath.
     In case of error, will return a default value.
 
-    :param xml_tree: the XML Tree object. Assumed is <type 'lxml.etree._Element'>.
-    :param path:     XPath to be applied, in order to extract the desired data.
-    :param default:  Value to be returned in case of error.
+    :param xml_tree:   the XML Tree object. Assumed is <type 'lxml.etree._Element'>.
+    :param path:       XPath to be applied, in order to extract the desired data.
+    :param default:    Value to be returned in case of error.
+    :param namespaces: prefix-namespace mappings to process XPath
     :return: a str value.
     """
     value = ""
     try:
-        xpath_applied = xml_tree.xpath(path)  # will consider the first match only
+        xpath_applied = xml_tree.xpath(
+            path, namespaces=namespaces
+        )  # will consider the first match only
         xpath_length = len(xpath_applied)  # get a count of items in XML tree
         if xpath_length and xpath_applied[0] is not None:
             xpath_result = xpath_applied[0]


Test patch:
Repository: napalm-automation/napalm

Issue:
Cisco Nexus 9000 series report old version number
### Description of Issue/Question

### Did you follow the steps from https://github.com/napalm-automation/napalm#faq
(Place an ``x`` between the square brackets where applicable)

- [x] Yes
- [] No


### Setup

### napalm version
```
2.4.0
```

### Network operating system version
(Paste verbatim output from `show version` - or equivalent - between quotes below)

```
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (C) 2002-2019, Cisco and/or its affiliates.
All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under their own
licenses, such as open source.  This software is provided "as is," and unless
otherwise stated, there is no warranty, express or implied, including but not
limited to warranties of merchantability and fitness for a particular purpose.
Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or 
GNU General Public License (GPL) version 3.0  or the GNU
Lesser General Public License (LGPL) Version 2.1 or 
Lesser General Public License (LGPL) Version 2.0. 
A copy of each such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://opensource.org/licenses/gpl-3.0.html and
http://www.opensource.org/licenses/lgpl-2.1.php and
http://www.gnu.org/licenses/old-licenses/library.txt.

Software
  BIOS: version 07.65
  NXOS: version 7.0(3)I7(6)
  BIOS compile time:  09/04/2018
  NXOS image file is: bootflash:///nxos.7.0.3.I7.6.bin
  NXOS compile time:  3/5/2019 13:00:00 [03/05/2019 22:04:55]


Hardware
  cisco Nexus9000 93180YC-EX chassis 
  Intel(R) Xeon(R) CPU  @ 1.80GHz with 24633600 kB of memory.
  Processor Board ID FDO2338098Y

  Device name: sw03.dus01
  bootflash:   53298520 kB
Kernel uptime is 39 day(s), 13 hour(s), 30 minute(s), 10 second(s)

Last reset at 449026 usecs after Fri Mar  6 02:25:49 2020
  Reason: Reset due to upgrade
  System version: 9.2(2)
  Service: 

plugin
  Core Plugin, Ethernet Plugin

Active Package(s):
```

### Steps to Reproduce the Issue
Downgrade a switch. `grains.get version` will report the previous version. 

As seen in the above, this switch will report its version is `9.2(2)`, even though it's running `7.0(3)I7(6).
This is due to the use of `rr_sys_ver` which reports the system version before the reboot.


Patch incoming.


Discussion:

Resolving patch:
diff --git a/napalm/nxos/nxos.py b/napalm/nxos/nxos.py
--- a/napalm/nxos/nxos.py
+++ b/napalm/nxos/nxos.py
@@ -804,7 +804,7 @@ def get_facts(self):
         facts["model"] = show_version.get("chassis_id", "")
         facts["hostname"] = show_version.get("host_name", "")
         facts["os_version"] = show_version.get(
-            "sys_ver_str", show_version.get("rr_sys_ver", "")
+            "sys_ver_str", show_version.get("kickstart_ver_str", "")
         )
 
         uptime_days = show_version.get("kern_uptm_days", 0)


Test patch:
Repository: napalm-automation/napalm

Issue:
possible typo in iosdriver?
### Description of Issue/Question

Hi,

while i'm playing with my driver fork ... it's probably nothing, but it doesn't make much sense to me. See the if ttl block.

regards

ios.py:L3196 [traceroute()]

```
        if ttl:
           if isinstance(ttl, int) and 0 <= timeout <= 255:
               command += " ttl 0 {}".format(str(ttl))
        if timeout:
            # Timeout should be an integer between 1 and 3600
            if isinstance(timeout, int) and 1 <= timeout <= 3600:
                command += " timeout {}".format(str(timeout))
```

### Did you follow the steps from https://github.com/napalm-automation/napalm#faq
(Place an ``x`` between the square brackets where applicable)

- [x] Yes
- [] No


### Setup

### napalm version
(Paste verbatim output from `pip freeze | grep napalm` between quotes below)

```
current develop branch(c35d503)
```

### Network operating system version
(Paste verbatim output from `show version` - or equivalent - between quotes below)

```
n/a
```

### Steps to Reproduce the Issue
n/a
### Error Traceback
(Paste the complete traceback of the exception between quotes below)

```
n/a
```



Discussion:
Yes, I think that looks a bit :fish: - at least the `command += " ttl 0 {}".format(str(ttl))` which should probably be `command += " ttl {}".format(ttl)` instead. Feel free to open a PR for that @remingu.

Resolving patch:
diff --git a/napalm/ios/ios.py b/napalm/ios/ios.py
--- a/napalm/ios/ios.py
+++ b/napalm/ios/ios.py
@@ -3192,8 +3192,8 @@ def traceroute(
         if source:
             command += " source {}".format(source)
         if ttl:
-            if isinstance(ttl, int) and 0 <= timeout <= 255:
-                command += " ttl 0 {}".format(str(ttl))
+            if isinstance(ttl, int) and 0 <= ttl <= 255:
+                command += " ttl {}".format(str(ttl))
         if timeout:
             # Timeout should be an integer between 1 and 3600
             if isinstance(timeout, int) and 1 <= timeout <= 3600:


Test patch:
diff --git a/test/ios/mocked_data/test_traceroute/normal/traceroute_8_8_8_8_ttl_0_255_timeout_2.txt b/test/ios/mocked_data/test_traceroute/normal/traceroute_8_8_8_8_ttl_255_timeout_2.txt
similarity index 100%
rename from test/ios/mocked_data/test_traceroute/normal/traceroute_8_8_8_8_ttl_0_255_timeout_2.txt
rename to test/ios/mocked_data/test_traceroute/normal/traceroute_8_8_8_8_ttl_255_timeout_2.txt
Repository: napalm-automation/napalm

Issue:
[IOS] Crash on `get_network_instances` for devices that do not support `show vrf detail` 
### Description of Issue/Question

Calling `get_network_instances` on a Cisco C2960XR crashes. I expect it not to crash.

### Did you follow the steps from https://github.com/napalm-automation/napalm#faq
(Place an ``x`` between the square brackets where applicable)

- [x] Yes
- [ ] No


### Setup

### napalm version

```
napalm==3.3.1
```

### Network operating system version


```
cisco WS-C2960XR-24TD-I (APM86XXX) processor (revision U0) with 524288K bytes of memory.

Switch Ports Model                     SW Version            SW Image                 
------ ----- -----                     ----------            ----------               
*    1 28    WS-C2960XR-24TD-I         15.2(2)E6             C2960X-UNIVERSALK9-M     

```

### Steps to Reproduce the Issue

Call `get_network_instances()`

### Error Traceback


```
Traceback (most recent call last):
  File "device.py", line 306, in get_truth_data
    vrfs = self.device.get_network_instances()
  File "venv/lib/python3.8/site-packages/napalm/ios/ios.py", line 3439, in get_network_instances
    vrf_name, RD = re.match(r"^VRF (\S+).*RD (.*);", first_part).groups()
AttributeError: 'NoneType' object has no attribute 'groups'

```

This is because `sh_vrf_detail` contains `Invalid input detected`



Discussion:

Resolving patch:
diff --git a/napalm/ios/ios.py b/napalm/ios/ios.py
--- a/napalm/ios/ios.py
+++ b/napalm/ios/ios.py
@@ -3427,6 +3427,10 @@ def get_network_instances(self, name=""):
             else:
                 return instances
 
+        if "Invalid input detected" in sh_vrf_detail:
+            # No VRF support
+            return instances
+
         for vrf in sh_vrf_detail.split("\n\n"):
 
             first_part = vrf.split("Address family")[0]


Test patch:
Repository: napalm-automation/napalm

Issue:
IOS-XR get_lldp_neighbor_details does not support 'N/A' capabilities
### Description of Issue/Question

The constants LLDP_CAPAB_TRANFORM_TABLE does not include 'N/A' of system capabilities. No checks for this value either.
```
<SystemCapabilities>
     N/A
</SystemCapabilities>
```


*Note*: Please check https://guides.github.com/features/mastering-markdown/
to see how to properly format your request.

### Did you follow the steps from https://github.com/napalm-automation/napalm#faq
(Place an ``x`` between the square brackets where applicable)

- [x] Yes
- [] No


### Setup

### napalm version
(Paste verbatim output from `pip freeze | grep napalm` between quotes below)

```
root@salt-master1:/# python3 -m pip freeze | grep napalm
napalm==3.2.0
```

### Network operating system version
(Paste verbatim output from `show version` - or equivalent - between quotes below)

```
RP/0/RP0/CPU0:hbr1.12345.999#show version
Wed Sep 23 18:41:02.500 CEST
Cisco IOS XR Software, Version 7.1.2 LNT
Copyright (c) 2013-2020 by Cisco Systems, Inc.

Build Information:
 Built By     : ahoang
 Built On     : Sat Aug 29 20:04:27 UTC 2020
 Build Host   : iox-lnx-069
 Workspace    : /auto/srcarchive13/prod/7.1.2/ncs540l/ws
 Version      : 7.1.2
 Label        : 7.1.2

cisco NCS540L (C3708 @ 1.70GHz)
System uptime is 1 week, 1 day, 10 hours, 2 minutes

```

### Steps to Reproduce the Issue

### Error Traceback
(Paste the complete traceback of the exception between quotes below)

```
================= Traceback =================

Traceback (most recent call last):
  File "/usr/local/bin/napalm", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/napalm/base/clitools/cl_napalm.py", line 308, in main
    run_tests(args)
  File "/usr/local/lib/python3.8/dist-packages/napalm/base/clitools/cl_napalm.py", line 291, in run_tests
    call_getter(device, args.method, **method_kwargs)
  File "/usr/local/lib/python3.8/dist-packages/napalm/base/clitools/cl_napalm.py", line 27, in wrapper
    r = func(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/napalm/base/clitools/cl_napalm.py", line 255, in call_getter
    r = func(**kwargs)
  File "/usr/local/lib/python3.8/dist-packages/napalm/iosxr/iosxr.py", line 852, in get_lldp_neighbors_detail
    "remote_system_capab": napalm.base.helpers.transform_lldp_capab(
  File "/usr/local/lib/python3.8/dist-packages/napalm/base/helpers.py", line 463, in transform_lldp_capab
    [constants.LLDP_CAPAB_TRANFORM_TABLE[c.strip()] for c in capabilities]
  File "/usr/local/lib/python3.8/dist-packages/napalm/base/helpers.py", line 463, in <listcomp>
    [constants.LLDP_CAPAB_TRANFORM_TABLE[c.strip()] for c in capabilities]
KeyError: 'n/a'
```



Discussion:

Resolving patch:
diff --git a/napalm/base/constants.py b/napalm/base/constants.py
--- a/napalm/base/constants.py
+++ b/napalm/base/constants.py
@@ -69,6 +69,7 @@
 }
 LLDP_CAPAB_TRANFORM_TABLE = {
     "o": "other",
+    "n/a": "other",
     "p": "repeater",
     "b": "bridge",
     "w": "wlan-access-point",


Test patch:
Repository: napalm-automation/napalm

Issue:
Arista SSH not closing connections correctly
### Description of Issue/Question

Napalm is not closing correctly the objects created for Arista SSH session. We identified this when noted a thread that remains open after a getter is completed for an EOS device. Trying to use the close() method is causing an exception (see below)  

### Did you follow the steps from https://github.com/napalm-automation/napalm#faq

- [x] Yes
- [] No


### Setup

### napalm version

```
napalm==4.0.0
```

### Network operating system version

```
vEOS
Hardware version: 
Serial number: 
Hardware MAC address: 5000.005b.6ff5
System MAC address: 5000.005b.6ff5

Software image version: 4.26.1F
Architecture: x86_64
Internal build version: 4.26.1F-22602519.4261F
Internal build ID: 1eca5f74-3ced-441a-9137-c966e8f0319d
Image format version: 01.00

Uptime: 0 weeks, 4 days, 8 hours and 42 minutes
Total memory: 2006832 kB
Free memory: 953144 kB
```

### Steps to Reproduce the Issue

Run a script including a Napalm getter inside a loop and monitor the threads. It will show a new thread after each run:

```python
import napalm
from threading import enumerate

eos = napalm.get_network_driver("eos")

optional_args={
    'port':22,
    'transport': 'ssh',
}

for _ in range(10):
    # Connect:
    device = eos(
        hostname="192.168.0.1",
        username="user",
        password="password",
        optional_args=optional_args
    )

    device.open()
    result = device.get_interfaces()
    #device.close()
    print(result)

    for thread in enumerate():
        print(thread.name)
```
device.close() is commented as it causes an exception

### Error Traceback

```
Traceback (most recent call last):
  File "test_napalm.py", line 21, in <module>
    device.close()
  File ".../venv/lib/python3.8/site-packages/napalm/eos/eos.py", line 234, in close
    if hasattr(self.device.connection, "close") and callable(
AttributeError: 'AristaSSH' object has no attribute 'connection'
```



Discussion:

Resolving patch:
diff --git a/napalm/eos/eos.py b/napalm/eos/eos.py
--- a/napalm/eos/eos.py
+++ b/napalm/eos/eos.py
@@ -36,7 +36,7 @@
 # third party libs
 import pyeapi
 from pyeapi.eapilib import ConnectionError, EapiConnection
-from netmiko import ConfigInvalidException
+from netmiko import BaseConnection, ConfigInvalidException
 
 # NAPALM base
 import napalm.base.helpers
@@ -231,7 +231,9 @@ def open(self):
     def close(self):
         """Implementation of NAPALM method close."""
         self.discard_config()
-        if hasattr(self.device.connection, "close") and callable(
+        if isinstance(self.device, BaseConnection):
+            self._netmiko_close()
+        elif hasattr(self.device.connection, "close") and callable(
             self.device.connection.close
         ):
             self.device.connection.close()


Test patch:
Repository: napalm-automation/napalm

Issue:
Linting issue with napalm/base/validate.py:165:10 E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()` [pycodestyle]
Last working build
```
Collecting pycodestyle (from flake8-import-order==0.18.2->-r requirements-dev.txt (line 4))
  Downloading pycodestyle-2.10.0-py2.py3-none-any.whl (41 kB)
```

failing build
```
Collecting pycodestyle (from flake8-import-order==0.18.2->-r requirements-dev.txt (line 4))
  Obtaining dependency information for pycodestyle from https://files.pythonhosted.org/packages/31/c2/e1508ed4395793f69e40fd8c6b5a690e1d568e649aae9492076a7b6befb4/pycodestyle-2.11.0-py2.py3-none-any.whl.metadata
  Downloading pycodestyle-2.11.0-py2.py3-none-any.whl.metadata (4.5 kB)
```
Guessing we have a new linting rule in pycodestyle 2.11

_Originally posted by @bewing in https://github.com/napalm-automation/napalm/issues/1983#issuecomment-1660467649_

Will provide a fix shortly - please assign this one to me.


Discussion:

Resolving patch:
diff --git a/napalm/base/validate.py b/napalm/base/validate.py
--- a/napalm/base/validate.py
+++ b/napalm/base/validate.py
@@ -162,7 +162,7 @@ def compare(
             else:
                 return src == dst
 
-    elif type(src) == type(dst) == list:
+    elif isinstance(src, list) and isinstance(dst, list):
         pairs = zip(src, dst)
         diff_lists = [
             [(k, x[k], y[k]) for k in x if not re.search(x[k], y[k])]


Test patch:
Repository: napalm-automation/napalm

Issue:
typo in model name 
https://github.com/napalm-automation/napalm/blob/1858e725d582be1b11c056a62a7768c3293d6fa3/napalm/base/models.py#L156


Discussion:

Resolving patch:
diff --git a/napalm/base/base.py b/napalm/base/base.py
--- a/napalm/base/base.py
+++ b/napalm/base/base.py
@@ -639,7 +639,7 @@ def get_lldp_neighbors_detail(
 
     def get_bgp_config(
         self, group: str = "", neighbor: str = ""
-    ) -> models.BPGConfigGroupDict:
+    ) -> models.BGPConfigGroupDict:
         """
         Returns a dictionary containing the BGP configuration.
         Can return either the whole config, either the config only for a group or neighbor.
diff --git a/napalm/base/models.py b/napalm/base/models.py
--- a/napalm/base/models.py
+++ b/napalm/base/models.py
@@ -153,8 +153,8 @@
     "AFDict", {"sent_prefixes": int, "accepted_prefixes": int, "received_prefixes": int}
 )
 
-BPGConfigGroupDict = TypedDict(
-    "BPGConfigGroupDict",
+BGPConfigGroupDict = TypedDict(
+    "BGPConfigGroupDict",
     {
         "type": str,
         "description": str,


Test patch:
diff --git a/napalm/base/test/base.py b/napalm/base/test/base.py
--- a/napalm/base/test/base.py
+++ b/napalm/base/test/base.py
@@ -323,7 +323,7 @@ def test_get_bgp_config(self):
         result = len(get_bgp_config) > 0
 
         for bgp_group in get_bgp_config.values():
-            result = result and self._test_model(models.BPGConfigGroupDict, bgp_group)
+            result = result and self._test_model(models.BGPConfigGroupDict, bgp_group)
             for bgp_neighbor in bgp_group.get("neighbors", {}).values():
                 result = result and self._test_model(
                     models.BGPConfigNeighborDict, bgp_neighbor
diff --git a/napalm/base/test/getters.py b/napalm/base/test/getters.py
--- a/napalm/base/test/getters.py
+++ b/napalm/base/test/getters.py
@@ -249,7 +249,7 @@ def test_get_bgp_config(self, test_case):
         assert get_bgp_config == {} or len(get_bgp_config) > 0
 
         for bgp_group in get_bgp_config.values():
-            assert helpers.test_model(models.BPGConfigGroupDict, bgp_group)
+            assert helpers.test_model(models.BGPConfigGroupDict, bgp_group)
             for bgp_neighbor in bgp_group.get("neighbors", {}).values():
                 assert helpers.test_model(models.BGPConfigNeighborDict, bgp_neighbor)
Repository: encode/uvicorn

Issue:
uvicorn 0.2 not compatible with django channels
daphe server for a project(avilpage) can be started with

```
daphne avilpage.asgi:application                                         
```

uvicorn fails with 

```
->uvicorn avilpage.asgi:application
Usage: uvicorn [OPTIONS] APP

Error: Error loading ASGI app. Could not import module "avilpage.asgi".
```

eventhough 

```
python -c 'import avilpage.asgi'                     
```
works fine without any errors.



Discussion:
I’d suggest having a look at the loading code in main.py to see what’s going wrong. If you can provide a *minimal* reproducible example that’d be good. My be an issue with PYTHONPATH being set incorrectly or something along those lines.
I’m AFK right now, but this shouldn’t be too tough to resolve with a bit of debugging. Loading the app is a small bit of code. Pull requests very welcome.
Oh I guess we need to split on the “.” for the import, probably not handling that correctly yet.

Temporary workaround: ensure the application is at the top-level of the module. Or run using gunicorn (see the docs)

Resolving patch:
diff --git a/uvicorn/__init__.py b/uvicorn/__init__.py
--- a/uvicorn/__init__.py
+++ b/uvicorn/__init__.py
@@ -1,4 +1,4 @@
 from uvicorn.main import main, run
 
-__version__ = "0.2.3"
+__version__ = "0.2.4"
 __all__ = ["main", "run"]
diff --git a/uvicorn/main.py b/uvicorn/main.py
--- a/uvicorn/main.py
+++ b/uvicorn/main.py
@@ -34,6 +34,7 @@ def main(app, host: str, port: int, loop: str, http: str, workers: int, log_leve
     log_level = LOG_LEVELS[log_level]
     logging.basicConfig(format="%(levelname)s: %(message)s", level=log_level)
 
+    sys.path.insert(0, ".")
     app = load_app(app)
     loop = get_event_loop(loop)
     logger = logging.getLogger()
@@ -69,7 +70,7 @@ def load_app(app):
         message = 'Invalid app string "{app}". Must be in format "<module>:<app>".'
         raise click.UsageError(message.format(app=app))
 
-    module_str, _, attr = app.partition(":")
+    module_str, attrs = app.split(":", 1)
     try:
         module = importlib.import_module(module_str)
     except ModuleNotFoundError:
@@ -77,10 +78,13 @@ def load_app(app):
         raise click.UsageError(message.format(module_str=module_str))
 
     try:
-        return getattr(module, attr)
+        for attr in attrs.split('.'):
+            asgi_app = getattr(module, attr)
     except AttributeError:
-        message = 'Error loading ASGI app. No attribute "{attr}" found in module "{module_str}".'
-        raise click.UsageError(message.format(attr=attr, module_str=module_str))
+        message = 'Error loading ASGI app. No app "{attrs}" found in module "{module_str}".'
+        raise click.UsageError(message.format(attrs=attrs, module_str=module_str))
+
+    return asgi_app
 
 
 def get_event_loop(loop):


Test patch: