nebius/SWE-bench-extra huggingface dataset:
Repository: getnikola/nikola

Issue:
Cannot build, AttributeError error
<!--
Before creating an issue:
* make sure you are using an up-to-date version of Nikola
* search for existing issues that might be related

Make sure to:
* provide information about your environment (below)
* include all the output you get, and any other information related to your problem

Nikola v7.6.4, as provided by Ubuntu, is NOT SUPPORTED.
If you are using this version, you should upgrade: https://getnikola.com/getting-started.html
-->

### Environment

**Python Version:** 3.10

**Nikola Version:** 8.2.2

**Operating System:** MacOS

### Description:

I get the following error:

```python
nikola_find_formatter_class
    if alias.lower().contains('html'):
AttributeError: 'str' object has no attribute 'contains'
```
See gh action: https://github.com/Woile/woile.github.io/runs/6389001428?check_suite_focus=true

Python does not have a `contains` method for strings, I'm submitting a PR now

Comments:

Patch:
diff --git a/AUTHORS.txt b/AUTHORS.txt
index 68a925bf0..efdcdf1b5 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -117,6 +117,7 @@
 * `Roman Faizullin <https://github.com/faizrr>`_
 * `Roman Imankulov <https://github.com/imankulov>`_
 * `Santiago Pestarini <https://github.com/quijot>`_
+* `Santiago Fraire Willemoes <https://github.com/Woile>`_
 * `Sean Pue <https://github.com/seanpue>`_
 * `Simon van der Veldt <https://github.com/simonvanderveldt>`_
 * `Stefan Näwe <https://github.com/snaewe>`_
diff --git a/CHANGES.txt b/CHANGES.txt
index b597b4d52..3809d9620 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,11 @@
+New in master
+=============
+
+Bugfixes
+--------
+
+* Find substring in string instead of using `contains` in utils
+
 New in v8.2.2
 =============
 
diff --git a/nikola/utils.py b/nikola/utils.py
index c735632c3..ed91e7c41 100644
--- a/nikola/utils.py
+++ b/nikola/utils.py
@@ -1714,7 +1714,7 @@ _original_find_formatter_class = pygments.formatters.find_formatter_class
 
 def nikola_find_formatter_class(alias):
     """Nikola-specific version of find_formatter_class."""
-    if alias.lower().contains('html'):
+    if "html" in alias.lower():
         return NikolaPygmentsHTML
     return _original_find_formatter_class(alias)
 


Test patch:
diff --git a/tests/test_utils.py b/tests/test_utils.py
index d92ae9c04..764eec2c2 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -14,11 +14,13 @@ from nikola.post import get_meta
 from nikola.utils import (
     TemplateHookRegistry,
     TranslatableSetting,
+    NikolaPygmentsHTML,
     demote_headers,
     get_asset_path,
     get_crumbs,
     get_theme_chain,
     get_translation_candidate,
+    nikola_find_formatter_class,
     write_metadata,
     bool_from_meta,
     parselinenos
@@ -639,3 +641,7 @@ def test_parselinenos():
         parselinenos('-', 10)
     with pytest.raises(ValueError):
         parselinenos('3-1', 10)
+
+
+def test_nikola_find_formatter_class_returns_pygments_class():
+    assert NikolaPygmentsHTML == nikola_find_formatter_class("html")