o
    b                     @   s<   d dl Z d dlZd dlmZ ddlmZ G dd deZdS )    N)Linter   )SortImportsc                   @   s   e Zd Zdd Zdd ZdS )r   c                 C   s
   | dS )z(Determine if this path should be linted.z.py)endswith)selfpath r   Q/var/www/secure340b-portal/env/lib/python3.10/site-packages/isort/pylama_isort.pyallow   s   
zLinter.allowc                 K   sf   t tjd#}|t_t|ddjr dddddgW  d   S g W  d   S 1 s,w   Y  dS )	z=Lint the file. Return an array of error dicts if appropriate.wT)checkr   zIncorrectly sorted imports.ZISORT)lnumcoltexttypeN)openosdevnullsysstdoutr   Zincorrectly_sorted)r   r   metar   r   r   r	   run   s   $z
Linter.runN)__name__
__module____qualname__r
   r   r   r   r   r	   r   	   s    r   )r   r   Zpylama.lintr   Z
BaseLinterZisortr   r   r   r   r	   <module>   s
    