File tree 7 files changed +56
-20
lines changed
7 files changed +56
-20
lines changed Original file line number Diff line number Diff line change
1
+ [flake8]
2
+ # Maximum line length
3
+ max-line-length = 160
4
+ # Maximum complexity
5
+ max-complexity = 10
6
+ # Files to exclude
7
+ exclude =
8
+ .git,
9
+ __pycache__,
10
+ build,
11
+ dist,
12
+ *.egg-info,
13
+ venv
14
+
15
+ # Ignore specific errors
16
+ ignore =
17
+ # Missing docstring in public module
18
+ D100,
19
+ # Missing docstring in public class
20
+ D101,
21
+ # Missing docstring in public method
22
+ D102,
23
+ # Missing docstring in public function
24
+ D103,
25
+ # Line break before binary operator
26
+ W503,
27
+ # Line break after binary operator
28
+ W504
29
+
30
+ # Specify the order of imports
31
+ import-order-style = google
32
+
33
+ # Additional configurations
34
+ statistics = True
35
+ count = True
36
+ show-source = True
Original file line number Diff line number Diff line change 1
- name : Pylint
1
+ name : Flake8
2
2
3
- on : [push]
3
+ on : [push, pull_request ]
4
4
5
5
jobs :
6
6
build :
19
19
- name : Install dependencies
20
20
run : |
21
21
python -m pip install --upgrade pip
22
- pip install -r src/requirements.txt
23
- pip install pylint
22
+ pip install flake8 flake8-import-order flake8-bugbear
24
23
25
24
- name : Analysing the code with pylint
26
- working-directory : src
27
25
run : |
28
- pylint $(git ls-files '*.py')
26
+ flake8 src/
Original file line number Diff line number Diff line change
1
+ {
2
+ "flake8.args" : [
3
+ " --config=.flake8"
4
+ ]
5
+ }
Original file line number Diff line number Diff line change 1
1
from typing import List
2
2
3
3
from autogen_core .base import AgentId , MessageContext
4
- from autogen_core .components import RoutedAgent , message_handler
4
+ from autogen_core .components import message_handler , RoutedAgent
5
+ from autogen_core .components .model_context import BufferedChatCompletionContext
5
6
from autogen_core .components .models import (
7
+ AssistantMessage ,
6
8
ChatCompletionClient ,
7
9
LLMMessage ,
8
10
SystemMessage ,
9
11
UserMessage ,
10
12
)
11
13
from autogen_core .components .tool_agent import tool_agent_caller_loop
12
14
from autogen_core .components .tools import ToolSchema
13
- from autogen_core .components .model_context import BufferedChatCompletionContext
14
- from autogen_core .components .models import AssistantMessage
15
-
16
-
17
15
from src .message_protocol .messages import Message
18
16
19
17
Original file line number Diff line number Diff line change 1
1
import asyncio
2
2
3
- from .agents .tool_use_agent import ToolUseAgent
4
-
5
- from .tools .tool_factory import get_tools
6
3
from autogen_core .application import SingleThreadedAgentRuntime
4
+ from autogen_core .base import AgentId
7
5
from autogen_core .components .tool_agent import ToolAgent
8
6
from autogen_ext .models import OpenAIChatCompletionClient
9
- from autogen_core .base import AgentId
10
- from .message_protocol .messages import Message
11
-
12
7
from dotenv import load_dotenv
13
-
14
8
from rich .console import Console
15
9
from rich .markdown import Markdown
16
10
11
+ from .agents .tool_use_agent import ToolUseAgent
12
+ from .message_protocol .messages import Message
13
+ from .tools .tool_factory import get_tools
14
+
17
15
18
16
async def main ():
19
17
load_dotenv ()
Original file line number Diff line number Diff line change 1
1
from dataclasses import dataclass
2
2
3
+
3
4
@dataclass
4
5
class Message :
5
- content : str
6
+ content : str
Original file line number Diff line number Diff line change 1
- from langchain_google_community import GmailToolkit
2
1
from autogen_ext .tools import LangChainToolAdapter
2
+ from langchain_google_community import GmailToolkit
3
3
4
4
5
5
def get_tools ():
You can’t perform that action at this time.
0 commit comments